Skip to content

Commit

Permalink
Integ:Hk2 v2.5.0-b62
Browse files Browse the repository at this point in the history
  • Loading branch information
ankathur authored and arindam-bandyopadhyay committed Aug 9, 2018
1 parent 194c996 commit d54a2cd
Show file tree
Hide file tree
Showing 19 changed files with 1,317 additions and 24 deletions.
8 changes: 7 additions & 1 deletion appserver/extras/embedded/all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@
</dependency>
<dependency>
<groupId>org.glassfish.hk2.external</groupId>
<artifactId>asm-all-repackaged</artifactId>
<artifactId>asm-repackaged</artifactId>
<version>${hk2.version}</version>
<optional>true</optional>
</dependency>
Expand Down Expand Up @@ -1732,6 +1732,12 @@
<artifactId>weld-se-shaded</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.glassfish.hk2</groupId>
<artifactId>tiger-types</artifactId>
<version>${project.version}</version>
<optional>true</optional>
</dependency>
</dependencies>

<profiles>
Expand Down
2 changes: 1 addition & 1 deletion appserver/extras/embedded/nucleus/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
</dependency>
<dependency>
<groupId>org.glassfish.hk2.external</groupId>
<artifactId>asm-all-repackaged</artifactId>
<artifactId>asm-repackaged</artifactId>
<version>${hk2.version}</version>
<optional>true</optional>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@
</dependency>
<dependency>
<groupId>org.glassfish.hk2.external</groupId>
<artifactId>asm-all-repackaged</artifactId>
<artifactId>asm-repackaged</artifactId>
<version>${hk2.version}</version>
<optional>true</optional>
</dependency>
Expand Down
8 changes: 7 additions & 1 deletion appserver/extras/embedded/web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
</dependency>
<dependency>
<groupId>org.glassfish.hk2.external</groupId>
<artifactId>asm-all-repackaged</artifactId>
<artifactId>asm-repackaged</artifactId>
<version>${hk2.version}</version>
<optional>true</optional>
</dependency>
Expand Down Expand Up @@ -1395,6 +1395,12 @@
<artifactId>shoal-gms-impl</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.glassfish.hk2</groupId>
<artifactId>tiger-types</artifactId>
<version>${project.version}</version>
<optional>true</optional>
</dependency>
</dependencies>

<profiles>
Expand Down
4 changes: 2 additions & 2 deletions nucleus/core/kernel/osgi.bundle
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ DynamicImport-Package: org.glassfish.flashlight.provider, \
org.objectweb.asm.commons;password=GlassFish

# Only in non-OSGi embedded mode, kernel depends on logging package, so
# optionally depend on that pkg. This way, when GF is embedded in
# optionally depend on that pkg. This way, when GF is embedded in
# OSGi environment, logging bundle need not be installed.
Import-Package: \
com.sun.enterprise.server.logging.*; resolution:=optional, \
org.jvnet.tiger_types;version="${project.version}", \
org.hibernate.validator.*;resolution:=optional;version="${hibernate-validator.version}", \
*

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Copyright (c) 1997-2018 Oracle and/or its affiliates. All rights reserved.
# Copyright 2004 The Apache Software Foundation
#
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
Expand Down Expand Up @@ -169,7 +169,7 @@ hk2.bundles=\
${com.sun.aas.installRootURI}modules/config-types.jar \
${com.sun.aas.installRootURI}modules/bean-validator.jar \
${com.sun.aas.installRootURI}modules/class-model.jar \
${com.sun.aas.installRootURI}modules/asm-all-repackaged.jar \
${com.sun.aas.installRootURI}modules/asm-repackaged.jar \
${com.sun.aas.installRootURI}modules/osgi-adapter.jar

core.bundles=\
Expand Down
13 changes: 12 additions & 1 deletion nucleus/featuresets/atomic/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,17 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.glassfish.hk2</groupId>
<artifactId>tiger-types</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.glassfish.hk2</groupId>
<artifactId>hk2</artifactId>
Expand Down Expand Up @@ -361,7 +372,7 @@
</dependency>
<dependency>
<groupId>org.glassfish.hk2.external</groupId>
<artifactId>asm-all-repackaged</artifactId>
<artifactId>asm-repackaged</artifactId>
<exclusions>
<exclusion>
<groupId>*</groupId>
Expand Down
7 changes: 6 additions & 1 deletion nucleus/hk2/hk2-config/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<version>5.0.1-SNAPSHOT</version>
</parent>
<artifactId>hk2-config</artifactId>

<name>HK2 configuration module</name>
<description>${project.name}</description>
<packaging>glassfish-jar</packaging>
Expand Down Expand Up @@ -131,6 +131,11 @@
<artifactId>hk2-core</artifactId>
<version>${hk2.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.hk2</groupId>
<artifactId>tiger-types</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
Expand Down
1 change: 1 addition & 0 deletions nucleus/hk2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
</plugins>
</build>
<modules>
<module>tiger-types</module>
<module>hk2-config</module>
<module>config-generator</module>
<module>config-types</module>
Expand Down
124 changes: 124 additions & 0 deletions nucleus/hk2/tiger-types/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
<!--
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
The contents of this file are subject to the terms of either the GNU
General Public License Version 2 only ("GPL") or the Common Development
and Distribution License("CDDL") (collectively, the "License"). You
may not use this file except in compliance with the License. You can
obtain a copy of the License at
https://oss.oracle.com/licenses/CDDL+GPL-1.1
or LICENSE.txt. See the License for the specific
language governing permissions and limitations under the License.
When distributing the software, include this License Header Notice in each
file and include the License file at LICENSE.txt.
GPL Classpath Exception:
Oracle designates this particular file as subject to the "Classpath"
exception as provided by Oracle in the GPL Version 2 section of the License
file that accompanied this code.
Modifications:
If applicable, add the following below the License Header, with the fields
enclosed by brackets [] replaced by your own identifying information:
"Portions Copyright [year] [name of copyright owner]"
Contributor(s):
If you wish your version of this file to be governed by only the CDDL or
only the GPL Version 2, indicate your decision by adding "[Contributor]
elects to include this software in this distribution under the [CDDL or GPL
Version 2] license." If you don't indicate a single choice of license, a
recipient has the option to distribute your version of this file under
either the CDDL, the GPL Version 2 or to extend the choice of license to
its licensees as provided above. However, if you add GPL Version 2 code
and therefore, elected the GPL Version 2 license, then the option applies
only if the new code is made subject to such option by the copyright
holder.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.glassfish.hk2</groupId>
<artifactId>glassfish-nucleus-hk2</artifactId>
<version>5.0.1-SNAPSHOT</version>
</parent>

<artifactId>tiger-types</artifactId>
<name>Tiger types- type arithmetic library for Java5</name>
<packaging>glassfish-jar</packaging>

<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-idea-plugin</artifactId>
<version>2.2</version>
<configuration>
<jdkName>JDK1.5</jdkName>
<downloadSources>true</downloadSources>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<mavenExecutorId>forked-path</mavenExecutorId>
<useReleaseProfile>false</useReleaseProfile>
<arguments>${release.arguments}</arguments>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
<Export-Package>
org.jvnet.tiger_types;version="${project.version}",
</Export-Package>
</instructions>
<unpackBundle>true</unpackBundle>
</configuration>

<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>

<reporting>
<plugins>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
</plugins>
</reporting>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2010-2018 Oracle and/or its affiliates. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
* and Distribution License("CDDL") (collectively, the "License"). You
* may not use this file except in compliance with the License. You can
* obtain a copy of the License at
* https://oss.oracle.com/licenses/CDDL+GPL-1.1
* or LICENSE.txt. See the License for the specific
* language governing permissions and limitations under the License.
*
* When distributing the software, include this License Header Notice in each
* file and include the License file at LICENSE.txt.
*
* GPL Classpath Exception:
* Oracle designates this particular file as subject to the "Classpath"
* exception as provided by Oracle in the GPL Version 2 section of the License
* file that accompanied this code.
*
* Modifications:
* If applicable, add the following below the License Header, with the fields
* enclosed by brackets [] replaced by your own identifying information:
* "Portions Copyright [year] [name of copyright owner]"
*
* Contributor(s):
* If you wish your version of this file to be governed by only the CDDL or
* only the GPL Version 2, indicate your decision by adding "[Contributor]
* elects to include this software in this distribution under the [CDDL or GPL
* Version 2] license." If you don't indicate a single choice of license, a
* recipient has the option to distribute your version of this file under
* either the CDDL, the GPL Version 2 or to extend the choice of license to
* its licensees as provided above. However, if you add GPL Version 2 code
* and therefore, elected the GPL Version 2 license, then the option applies
* only if the new code is made subject to such option by the copyright
* holder.
*/

package org.jvnet.tiger_types;

import java.lang.reflect.GenericArrayType;
import java.lang.reflect.Type;

/**
* Implementation of GenericArrayType interface for core reflection.
*/
final class GenericArrayTypeImpl implements GenericArrayType {
private Type genericComponentType;

GenericArrayTypeImpl(Type ct) {
assert ct!=null;
genericComponentType = ct;
}

/**
* Returns a <tt>Type</tt> object representing the component type
* of this array.
*
* @return a <tt>Type</tt> object representing the component type
* of this array
* @since 1.5
*/
public Type getGenericComponentType() {
return genericComponentType; // return cached component type
}

public String toString() {
Type componentType = getGenericComponentType();
StringBuilder sb = new StringBuilder();

if (componentType instanceof Class)
sb.append(((Class) componentType).getName());
else
sb.append(componentType.toString());
sb.append("[]");
return sb.toString();
}

@Override
public boolean equals(Object o) {
if (o instanceof GenericArrayType) {
GenericArrayType that = (GenericArrayType) o;

Type thatComponentType = that.getGenericComponentType();
return genericComponentType.equals(thatComponentType);
} else
return false;
}

@Override
public int hashCode() {
return genericComponentType.hashCode();
}
}
Loading

0 comments on commit d54a2cd

Please sign in to comment.