harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r405354 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/reflect: GenericDeclaration.java Type.java TypeVariable.java
Date Tue, 09 May 2006 09:17:37 GMT
Author: tellison
Date: Tue May  9 02:17:35 2006
New Revision: 405354

URL: http://svn.apache.org/viewcvs?rev=405354&view=rev
Log:
Add new j.l.reflect interfaces

Added:
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/reflect/GenericDeclaration.java
  (with props)
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/reflect/Type.java
  (with props)
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/reflect/TypeVariable.java
  (with props)

Added: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/reflect/GenericDeclaration.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/reflect/GenericDeclaration.java?rev=405354&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/reflect/GenericDeclaration.java
(added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/reflect/GenericDeclaration.java
Tue May  9 02:17:35 2006
@@ -0,0 +1,33 @@
+/* Copyright 2006 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package java.lang.reflect;
+
+/**
+ * Common interface for entities that have type variables. 
+ */
+public interface GenericDeclaration {
+
+    /**
+     * Answers the generic declared types in declaration order.
+     * If there are no generic types this method returns a zero
+     * length array.
+     * 
+     * @return array of generic declared type variables.
+     * @throws GenericSignatureFormatError if the signature is malformed.
+     */
+    TypeVariable<?>[] getTypeParameters();
+
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/reflect/GenericDeclaration.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/reflect/Type.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/reflect/Type.java?rev=405354&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/reflect/Type.java
(added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/reflect/Type.java
Tue May  9 02:17:35 2006
@@ -0,0 +1,23 @@
+/* Copyright 2006 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package java.lang.reflect;
+
+/**
+ * Common interface for all Java types.
+ */
+public interface Type {
+    // Empty
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/reflect/Type.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/reflect/TypeVariable.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/reflect/TypeVariable.java?rev=405354&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/reflect/TypeVariable.java
(added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/reflect/TypeVariable.java
Tue May  9 02:17:35 2006
@@ -0,0 +1,42 @@
+/* Copyright 2006 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package java.lang.reflect;
+
+public interface TypeVariable<D extends GenericDeclaration> extends Type {
+
+    /**
+     * Answers the upper bounds of the type variable.
+     * 
+     * @return array of type variable's upper bounds.
+     * @throws MalformedParameterizedTypeException
+     * @throws TypeNotPresentException
+     */
+    Type[] getBounds();
+
+    /**
+     * Answers a GenericDeclaration object for this type variable.
+     * 
+     * @return the generic declaration spec
+     */
+    D getGenericDeclaration();
+
+    /**
+     * Answers the type variable's name from source.
+     * 
+     * @return the variable's name from the source code.
+     */
+    String getName();
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/reflect/TypeVariable.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message