From fa911d0edf35398c986c80258016a2b26e62691c Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 12 Feb 2007 17:20:06 +0000 Subject: * vm/reference/java/lang/reflect/Method.java (getDefaultValue): New method. * sun/reflect/annotation/AnnotationInvocationHandler.java (create): New method. (arrayClone): New method. (invoke): Clone array return results. --- vm/reference/java/lang/reflect/Method.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'vm/reference/java') diff --git a/vm/reference/java/lang/reflect/Method.java b/vm/reference/java/lang/reflect/Method.java index c520f0570..2db59fee4 100644 --- a/vm/reference/java/lang/reflect/Method.java +++ b/vm/reference/java/lang/reflect/Method.java @@ -1,5 +1,5 @@ /* java.lang.reflect.Method - reflection of Java methods - Copyright (C) 1998, 2001, 2002, 2005 Free Software Foundation, Inc. + Copyright (C) 1998, 2001, 2002, 2005, 2007 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -449,4 +449,17 @@ extends AccessibleObject implements Member, GenericDeclaration MethodSignatureParser p = new MethodSignatureParser(this, sig); return p.getGenericReturnType(); } + + /** + * If this method is an annotation method, returns the default + * value for the method. If there is no default value, or if the + * method is not a member of an annotation type, returns null. + * Primitive types are wrapped. + * + * @throws TypeNotPresentException if the method returns a Class, + * and the class cannot be found + * + * @since 1.5 + */ + public native Object getDefaultValue(); } -- cgit v1.2.1