public final class ReflectionUtil extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ReflectionUtil.ReflectionType
Enum which defines which information is retrieved by reflection.
|
| Modifier and Type | Method and Description |
|---|---|
static Set<Field> |
getAllDeclaredFields(Class<?> _class,
String... _fieldsToIgnore)
Extract all
Fields found in the given class recursively. |
static Set<Field> |
getAllDeclaredFieldsAnnotatedWithAny(Class<?> _class,
Class<? extends Annotation>... _annotations)
Extract all
Fields with any of the given annotations found in the given class recursively. |
static Set<Field> |
getAllDeclaredFieldsNotAnnotatedWithAny(Class<?> _class,
Class<? extends Annotation>... _annotations)
Extract all
Fields without any of the given annotations found in the given class recursively. |
static Set<Method> |
getAllDeclaredMethods(Class<?> _class,
String... _methodsToIgnore)
Extract all
Methods found in the given class recursively. |
static Set<Method> |
getAllDeclaredMethodsAnnotatedWithAny(Class<?> _class,
Class<? extends Annotation>... _annotations)
Extract all
Methods with any of the given annotations found in the given class recursively. |
static Set<Method> |
getAllDeclaredMethodsNotAnnotatedWithAny(Class<?> _class,
Class<? extends Annotation>... _annotations)
Extract all
Methods without any of the given annotations found in the given class recursively. |
static Set<Field> |
getAllDeclaredNonStaticFields(Class<?> _class,
String... _fieldsToIgnore)
Extract all
Fields which are not static and do not match any of the given ignore names. |
static Set<Method> |
getAllDeclaredNonStaticMethods(Class<?> _class,
String... _methodNamesToIgnore)
Extract all
Methods which are not static and do not match any of the given ignore names. |
static Set<Field> |
getAllDeclaredStaticFields(Class<?> _class,
String... _fieldsToIgnore)
Extract all
Fields which are static and do not match any of the given ignore names. |
static Set<Method> |
getAllDeclaredStaticMethods(Class<?> _class,
String... _methodNamesToIgnore)
Extract all
Methods which are static and do not match any of the given ignore names. |
public static Set<Field> getAllDeclaredFields(Class<?> _class, String... _fieldsToIgnore)
Fields found in the given class recursively.
This means, all Fields are retrieved, even fields which only exists in superclasses.Fields returned in the Set have not been changed
(setAccessable(true) is NOT called explicitly)!_class - _fieldsToIgnore - public static Set<Field> getAllDeclaredStaticFields(Class<?> _class, String... _fieldsToIgnore)
Fields which are static and do not match any of the given ignore names._class - _fieldsToIgnore - public static Set<Field> getAllDeclaredNonStaticFields(Class<?> _class, String... _fieldsToIgnore)
Fields which are not static and do not match any of the given ignore names._class - _fieldsToIgnore - @SafeVarargs public static Set<Field> getAllDeclaredFieldsAnnotatedWithAny(Class<?> _class, Class<? extends Annotation>... _annotations)
Fields with any of the given annotations found in the given class recursively.
This means, all Fields are retrieved, even fields which only exists in superclasses.Fields returned in the Set have not been changed
(setAccessable(true) is NOT called explicitly)!_class - _annotations - @SafeVarargs public static Set<Field> getAllDeclaredFieldsNotAnnotatedWithAny(Class<?> _class, Class<? extends Annotation>... _annotations)
Fields without any of the given annotations found in the given class recursively.
This means, all Fields are retrieved, even fields which only exists in superclasses.Fields returned in the Set have not been changed
(setAccessable(true) is NOT called explicitly)!_class - _annotations - public static Set<Method> getAllDeclaredMethods(Class<?> _class, String... _methodsToIgnore)
Methods found in the given class recursively.
This means, all Methods are retrieved, even methods which only exists in superclasses.Methods returned in the Set have not been changed
(setAccessable(true) is NOT called explicitly)!_class - _methodsToIgnore - public static Set<Method> getAllDeclaredStaticMethods(Class<?> _class, String... _methodNamesToIgnore)
Methods which are static and do not match any of the given ignore names._class - _methodNamesToIgnore - public static Set<Method> getAllDeclaredNonStaticMethods(Class<?> _class, String... _methodNamesToIgnore)
Methods which are not static and do not match any of the given ignore names._class - _methodNamesToIgnore - @SafeVarargs public static Set<Method> getAllDeclaredMethodsAnnotatedWithAny(Class<?> _class, Class<? extends Annotation>... _annotations)
Methods with any of the given annotations found in the given class recursively.
This means, all Methods are retrieved, even fields which only exists in superclasses.Methods returned in the Set have not been changed
(setAccessable(true) is NOT called explicitly)!_class - _annotations - @SafeVarargs public static Set<Method> getAllDeclaredMethodsNotAnnotatedWithAny(Class<?> _class, Class<? extends Annotation>... _annotations)
Methods without any of the given annotations found in the given class recursively.
This means, all Methods are retrieved, even fields which only exists in superclasses.Methods returned in the Set have not been changed
(setAccessable(true) is NOT called explicitly)!_class - _annotations - Copyright © 2018. All rights reserved.