summaryrefslogtreecommitdiff
path: root/libjava/java/lang/reflect
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/lang/reflect')
-rw-r--r--libjava/java/lang/reflect/Constructor.java25
-rw-r--r--libjava/java/lang/reflect/Field.java5
-rw-r--r--libjava/java/lang/reflect/Method.java25
3 files changed, 53 insertions, 2 deletions
diff --git a/libjava/java/lang/reflect/Constructor.java b/libjava/java/lang/reflect/Constructor.java
index 980ca2a41f2..b789fb13031 100644
--- a/libjava/java/lang/reflect/Constructor.java
+++ b/libjava/java/lang/reflect/Constructor.java
@@ -44,7 +44,8 @@ package java.lang.reflect;
* @since 1.1
* @status updated to 1.4
*/
-public final class Constructor extends AccessibleObject implements Member
+public final class Constructor extends AccessibleObject
+ implements Member, GenericDeclaration
{
/**
* This class is uninstantiable except from native code.
@@ -203,6 +204,28 @@ public final class Constructor extends AccessibleObject implements Member
throws InstantiationException, IllegalAccessException,
IllegalArgumentException, InvocationTargetException;
+ // FIXME - Write a real implementation
+ public boolean isSynthetic() { return false; }
+
+ /**
+ * Returns an array of <code>TypeVariable</code> objects that represents
+ * the type variables declared by this constructor, in declaration order.
+ * An array of size zero is returned if this class has no type
+ * variables.
+ *
+ * @return the type variables associated with this class.
+ * @throws GenericSignatureFormatError if the generic signature does
+ * not conform to the format specified in the Virtual Machine
+ * specification, version 3.
+ * @since 1.5
+ */
+ /* FIXME[GENERICS]: Should be TypeVariable<Method>[] */
+ public TypeVariable[] getTypeParameters()
+ {
+ // FIXME - write a real implementation
+ return new TypeVariable[0];
+ }
+
// Update cached values from method descriptor in class.
private native void getType ();
diff --git a/libjava/java/lang/reflect/Field.java b/libjava/java/lang/reflect/Field.java
index cb852cf2fb2..10884c1bd7d 100644
--- a/libjava/java/lang/reflect/Field.java
+++ b/libjava/java/lang/reflect/Field.java
@@ -262,4 +262,9 @@ public final class Field extends AccessibleObject implements Member
sbuf.append(getName());
return sbuf.toString();
}
+
+ // FIXME - Write a real implementations
+ public boolean isSynthetic() { return false; }
+ public boolean isEnumConstant() { return false; }
+
}
diff --git a/libjava/java/lang/reflect/Method.java b/libjava/java/lang/reflect/Method.java
index f93a7278890..a5047f5371b 100644
--- a/libjava/java/lang/reflect/Method.java
+++ b/libjava/java/lang/reflect/Method.java
@@ -46,7 +46,8 @@ import gnu.gcj.RawData;
* @since 1.1
* @status updated to 1.4
*/
-public final class Method extends AccessibleObject implements Member
+public final class Method extends AccessibleObject
+ implements Member, GenericDeclaration
{
/**
* This class is uninstantiable.
@@ -262,6 +263,28 @@ public final class Method extends AccessibleObject implements Member
}
}
+ // FIXME - Write a real implementation
+ public boolean isSynthetic() { return false; }
+
+ /**
+ * Returns an array of <code>TypeVariable</code> objects that represents
+ * the type variables declared by this constructor, in declaration order.
+ * An array of size zero is returned if this class has no type
+ * variables.
+ *
+ * @return the type variables associated with this class.
+ * @throws GenericSignatureFormatError if the generic signature does
+ * not conform to the format specified in the Virtual Machine
+ * specification, version 3.
+ * @since 1.5
+ */
+ /* FIXME[GENERICS]: Should be TypeVariable<Method>[] */
+ public TypeVariable[] getTypeParameters()
+ {
+ // FIXME - write a real implementation
+ return new TypeVariable[0];
+ }
+
// Declaring class.
private Class declaringClass;