| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static Class | |
| public static Annotation | getAnnotation(Class<T> c, Class<? extends Annotation> annotationType)
Returns an |
| public static Annotation[] | getAnnotations(Class<T> c)
Returns an array of |
| public static Class | |
| public static Constructor | getConstructor(Class<T> c, Class<T>... parameterTypes)
Returns a |
| public static Constructor[] | getConstructors(Class<T> c)
Returns an array of |
| public static Annotation | getDeclaredAnnotation(Class<T> c, Class<? extends Annotation> annotationType)
Returns an |
| public static Annotation[] | getDeclaredAnnotations(Class<T> c)
Returns an array of |
| public static Constructor | getDeclaredConstructor(Class<T> c, Class<T>... parameterTypes)
Returns a |
| public static Field | getDeclaredField(Class<T> c, String name)
Returns a |
| public static Field[] | getDeclaredFields(Class<T> c)
Returns an array of |
| public static Method | getDeclaredMethod(Class<T> c, String name, Class<T>... parameterTypes)
Returns a |
| public static Method[] | getDeclaredMethods(Class<T> c)
Returns an array of |
| public static Object[] | getEnumConstants(Class<T> c)
Returns the elements of this enum class or null if this Class object does not represent an enum type. |
| public static Field | |
| public static Field[] | |
| public static Class | |
| public static Method | |
| public static Method[] | getMethods(Class<T> c)
Returns an array of |
| public static String | getSimpleName(Class<T> c)
Returns the simple name of the underlying class as supplied in the source code. |
| public static boolean | |
| public static boolean | |
| public static boolean | isAnnotationPresent(Class<T> c, Class<? extends Annotation> annotationType)
Returns true if the supplied class includes an annotation of the given type. |
| public static boolean | |
| public static boolean | isAssignableFrom(Class<T> c1, Class<T> c2)
Determines if the class or interface represented by first Class parameter is either the same as, or is a superclass or superinterface of, the class or interface represented by the second Class parameter. |
| public static boolean | |
| public static boolean | isInstance(Class<T> c, Object obj)
Determines if the supplied Object is assignment-compatible with the object represented by supplied Class. |
| public static boolean | |
| public static boolean | isMemberClass(Class<T> c)
Returns true if the class or interface represented by the supplied Class is a member class. |
| public static boolean | |
| public static boolean | isStaticClass(Class<T> c)
Returns true if the class or interface represented by the supplied Class is a static class. |
| public static <T> T |
| ClassReflection | back to summary |
|---|---|
| public ClassReflection() | |
| forName | back to summary |
|---|---|
| public static Class Returns the Class object associated with the class or interface with the supplied string name. | |
| getAnnotation | back to summary |
|---|---|
| public static Annotation getAnnotation(Class<T> c, Class<? extends Annotation> annotationType) Returns an | |
| getAnnotations | back to summary |
|---|---|
| public static Annotation[] getAnnotations(Class<T> c) Returns an array of | |
| getComponentType | back to summary |
|---|---|
| public static Class Returns the Class representing the component type of an array. If this class does not represent an array class this method returns null. | |
| getConstructor | back to summary |
|---|---|
| public static Constructor getConstructor(Class<T> c, Class<T>... parameterTypes) throws ReflectionException Returns a | |
| getConstructors | back to summary |
|---|---|
| public static Constructor[] getConstructors(Class<T> c) Returns an array of | |
| getDeclaredAnnotation | back to summary |
|---|---|
| public static Annotation getDeclaredAnnotation(Class<T> c, Class<? extends Annotation> annotationType) Returns an | |
| getDeclaredAnnotations | back to summary |
|---|---|
| public static Annotation[] getDeclaredAnnotations(Class<T> c) Returns an array of | |
| getDeclaredConstructor | back to summary |
|---|---|
| public static Constructor getDeclaredConstructor(Class<T> c, Class<T>... parameterTypes) throws ReflectionException Returns a | |
| getDeclaredField | back to summary |
|---|---|
| public static Field getDeclaredField(Class<T> c, String name) throws ReflectionException Returns a | |
| getDeclaredFields | back to summary |
|---|---|
| public static Field[] getDeclaredFields(Class<T> c) Returns an array of | |
| getDeclaredMethod | back to summary |
|---|---|
| public static Method getDeclaredMethod(Class<T> c, String name, Class<T>... parameterTypes) throws ReflectionException Returns a | |
| getDeclaredMethods | back to summary |
|---|---|
| public static Method[] getDeclaredMethods(Class<T> c) Returns an array of | |
| getEnumConstants | back to summary |
|---|---|
| public static Object[] getEnumConstants(Class<T> c) Returns the elements of this enum class or null if this Class object does not represent an enum type. | |
| getField | back to summary |
|---|---|
| public static Field getField(Class<T> c, String name) throws ReflectionException Returns a | |
| getFields | back to summary |
|---|---|
| public static Field[] getFields(Class<T> c) Returns an array of | |
| getInterfaces | back to summary |
|---|---|
| public static Class | |
| getMethod | back to summary |
|---|---|
| public static Method getMethod(Class<T> c, String name, Class<T>... parameterTypes) throws ReflectionException Returns a | |
| getMethods | back to summary |
|---|---|
| public static Method[] getMethods(Class<T> c) Returns an array of | |
| getSimpleName | back to summary |
|---|---|
| public static String getSimpleName(Class<T> c) Returns the simple name of the underlying class as supplied in the source code. | |
| isAbstract | back to summary |
|---|---|
| public static boolean isAbstract(Class<T> c) Determines if the supplied Class object represents an abstract type. | |
| isAnnotation | back to summary |
|---|---|
| public static boolean isAnnotation(Class<T> c) Determines if the supplied Class object represents an annotation type. | |
| isAnnotationPresent | back to summary |
|---|---|
| public static boolean isAnnotationPresent(Class<T> c, Class<? extends Annotation> annotationType) Returns true if the supplied class includes an annotation of the given type. | |
| isArray | back to summary |
|---|---|
| public static boolean isArray(Class<T> c) Determines if the supplied Class object represents an array class. | |
| isAssignableFrom | back to summary |
|---|---|
| public static boolean isAssignableFrom(Class<T> c1, Class<T> c2) Determines if the class or interface represented by first Class parameter is either the same as, or is a superclass or superinterface of, the class or interface represented by the second Class parameter. | |
| isEnum | back to summary |
|---|---|
| public static boolean isEnum(Class<T> c) Determines if the supplied Class object represents an enum type. | |
| isInstance | back to summary |
|---|---|
| public static boolean isInstance(Class<T> c, Object obj) Determines if the supplied Object is assignment-compatible with the object represented by supplied Class. | |
| isInterface | back to summary |
|---|---|
| public static boolean isInterface(Class<T> c) Determines if the supplied Class object represents an interface type. | |
| isMemberClass | back to summary |
|---|---|
| public static boolean isMemberClass(Class<T> c) Returns true if the class or interface represented by the supplied Class is a member class. | |
| isPrimitive | back to summary |
|---|---|
| public static boolean isPrimitive(Class<T> c) Determines if the supplied Class object represents a primitive type. | |
| isStaticClass | back to summary |
|---|---|
| public static boolean isStaticClass(Class<T> c) Returns true if the class or interface represented by the supplied Class is a static class. | |
| newInstance | back to summary |
|---|---|
| public static <T> T newInstance(Class<T> c) throws ReflectionException Creates a new instance of the class represented by the supplied Class. | |