summaryrefslogtreecommitdiff
path: root/libjava/java/lang/reflect/Method.java
diff options
context:
space:
mode:
authoraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>2007-03-05 16:06:27 +0000
committeraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>2007-03-05 16:06:27 +0000
commit2abaa5a3b86121453d7be0000f70418c08784c0d (patch)
treedb2cc96f747dfe385b80f218bee0aca23560701e /libjava/java/lang/reflect/Method.java
parent3dbf7319f6bfc98d7cfc1318538554278e42648a (diff)
downloadgcc-2abaa5a3b86121453d7be0000f70418c08784c0d.tar.gz
2007-03-05 Andrew Haley <aph@redhat.com>
* java/lang/reflect/natVMProxy.cc (ncode_closure.meth): Delete. (generateProxyClass): Don't pass method to ncode. (run_proxy): Call _Jv_GetReflectedMethod to find the proxy method. * java/lang/reflect/Method.h: Rebuild. * java/lang/reflect/Method.java (internalGetParameterTypes, internalGetExceptionTypes): New methods. * headers.txt (class java/lang/reflect/Method): Declare _Jv_GetReflectedMethod. Be its friend. * java/lang/natClass.cc (_Jv_GetReflectedMethod): New method. * java/lang/Class.h: Declare it. Be its friend. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122554 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/lang/reflect/Method.java')
-rw-r--r--libjava/java/lang/reflect/Method.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/libjava/java/lang/reflect/Method.java b/libjava/java/lang/reflect/Method.java
index 6fa2956e40e..878210abbd2 100644
--- a/libjava/java/lang/reflect/Method.java
+++ b/libjava/java/lang/reflect/Method.java
@@ -153,6 +153,15 @@ public final class Method
return (Class<?>[]) parameter_types.clone();
}
+ // Just like getParameterTypes, but don't clone the array.
+ // Package private for use by VMProxy.
+ final Class<?>[] internalGetParameterTypes ()
+ {
+ if (parameter_types == null)
+ getType();
+ return (Class<?>[]) parameter_types;
+ }
+
/**
* Get the exception types this method says it throws, in no particular
* order. If the method has no throws clause, returns a 0-length array
@@ -167,6 +176,15 @@ public final class Method
return (Class<?>[]) exception_types.clone();
}
+ // Just like getExceptionTypes, but don't clone the array.
+ // Package private for use by VMProxy.
+ final Class<?>[] internalGetExceptionTypes ()
+ {
+ if (exception_types == null)
+ getType();
+ return (Class<?>[]) exception_types;
+ }
+
/**
* Compare two objects to see if they are semantically equivalent.
* Two Methods are semantically equivalent if they have the same declaring