public final class ReflectionUtil extends Object
| 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<Field> |
getAllDeclaredNonStaticFields(Class<?> _class,
String... _fieldsToIgnore)
Does what
getAllDeclaredFields(Class, String...) does, but filters all static fields. |
static Set<Field> |
getAllDeclaredStaticFields(Class<?> _class,
String... _fieldsToIgnore)
Does what
getAllDeclaredFields(Class, String...) does, but filters all non-static fields. |
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)
getAllDeclaredFields(Class, String...) does, but filters all non-static fields._class - _fieldsToIgnore - public static Set<Field> getAllDeclaredNonStaticFields(Class<?> _class, String... _fieldsToIgnore)
getAllDeclaredFields(Class, String...) does, but filters all static fields._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 - Copyright © 2018. All rights reserved.