diff options
Diffstat (limited to 'libjava/classpath/java/lang/reflect')
-rw-r--r-- | libjava/classpath/java/lang/reflect/InvocationTargetException.java | 6 | ||||
-rw-r--r-- | libjava/classpath/java/lang/reflect/Member.java | 2 | ||||
-rw-r--r-- | libjava/classpath/java/lang/reflect/Modifier.java | 42 |
3 files changed, 45 insertions, 5 deletions
diff --git a/libjava/classpath/java/lang/reflect/InvocationTargetException.java b/libjava/classpath/java/lang/reflect/InvocationTargetException.java index af79d3a199d..4480fc6d006 100644 --- a/libjava/classpath/java/lang/reflect/InvocationTargetException.java +++ b/libjava/classpath/java/lang/reflect/InvocationTargetException.java @@ -1,5 +1,5 @@ /* InvocationTargetException.java -- Wrapper exception for reflection - Copyright (C) 1998, 1999, 2000, 2001, 2002, 2005 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2001, 2002, 2005, 2012 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -50,9 +50,9 @@ package java.lang.reflect; * @see Method#invoke(Object,Object[]) * @see Constructor#newInstance(Object[]) * @since 1.1 - * @status updated to 1.4 + * @status updated to 1.7 */ -public class InvocationTargetException extends Exception +public class InvocationTargetException extends ReflectiveOperationException { /** * Compatible with JDK 1.1+. diff --git a/libjava/classpath/java/lang/reflect/Member.java b/libjava/classpath/java/lang/reflect/Member.java index fed962cf913..945fbf69663 100644 --- a/libjava/classpath/java/lang/reflect/Member.java +++ b/libjava/classpath/java/lang/reflect/Member.java @@ -79,7 +79,7 @@ public interface Member * * @return the class that declared this member */ - Class getDeclaringClass(); + Class<?> getDeclaringClass(); /** * Gets the simple name of this member. This will be a valid Java diff --git a/libjava/classpath/java/lang/reflect/Modifier.java b/libjava/classpath/java/lang/reflect/Modifier.java index 15bad05e738..c75f7b81823 100644 --- a/libjava/classpath/java/lang/reflect/Modifier.java +++ b/libjava/classpath/java/lang/reflect/Modifier.java @@ -1,5 +1,5 @@ /* java.lang.reflect.Modifier - Copyright (C) 1998, 1999, 2001, 2002, 2005, 2008 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2001, 2002, 2005, 2008, 2012 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -300,6 +300,46 @@ public class Modifier } /** + * @since 1.7 + */ + public static int classModifiers() + { + return PUBLIC | PROTECTED | PRIVATE | STATIC | ABSTRACT | FINAL | STRICT; + } + + /** + * @since 1.7 + */ + public static int interfaceModifiers() + { + return PUBLIC | PROTECTED | PRIVATE | STATIC | ABSTRACT | STRICT; + } + + /** + * @since 1.7 + */ + public static int constructorModifiers() + { + return PUBLIC | PROTECTED | PRIVATE; + } + + /** + * @since 1.7 + */ + public static int methodModifiers() + { + return PUBLIC | PROTECTED | PRIVATE | STATIC | ABSTRACT | FINAL | STRICT | SYNCHRONIZED | NATIVE; + } + + /** + * @since 1.7 + */ + public static int fieldModifiers() + { + return PUBLIC | PROTECTED | PRIVATE | STATIC | FINAL | TRANSIENT | VOLATILE; + } + + /** * Get a string representation of all the modifiers represented by the * given int. The keywords are printed in this order: * <code><public|protected|private> abstract static final transient |