|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.craftforge.reflection.managers.ClassManager
public class ClassManager
Manages a class by caching all reflection actions provided by the manager.
| Method Summary | |
|---|---|
List<Field> |
getActualReferences()
Gets all actual reference fields of a class. |
ConcurrentMap<String,List<Method>> |
getAllGetterMethods()
Gets all getter methods of a class and groups them by their corresponding field names. |
List<Method> |
getAllMethodsAnnotatedWith(Class<? extends Annotation> annotationClass)
Gets all methods being annotated with an annotation of the given annotation class. |
List<Field> |
getAllPropertiesAnnotatedWith(Class<? extends Annotation> annotationClass)
Gets all fields which are annotated themselves or whose corresponding getters or setters are annotated with an annotation of the given annotation class. |
ConcurrentMap<String,List<Method>> |
getAllSetterMethods()
Gets all setter methods of a class and groups them by their corresponding field names. |
List<Class<?>> |
getClassHierarchy()
Gets a class hierarchy of the class as a list containing the class itself and all its super classes except of java.lang.Object. |
List<Class<?>> |
getCompleteClassHierarchy()
Gets a class hierarchy of the class as a list containing the class itself and all its super classes as well as all implemented interfaces within the class hierarchy and their super interfaces. |
List<Method> |
getCompleteClassHierarchyMethods()
Gets all declared methods. |
static ClassManager |
getInstance(Class<?> clazz)
Gets the class manager corresponding to the class. |
static ClassManager |
getInstance(Field field)
Gets the class manager corresponding to the field's declaring class |
static ClassManager |
getInstance(Method method)
Gets the class manager corresponding to the method's declaring class |
List<Class<?>> |
getInterfaceHierarchy()
Gets a interface hierarchy of the class as a list containing the class's implemented interfaces and all their super interfaces. |
Annotation |
getMethodLevelAnnotation(Method method,
Class<? extends Annotation> annotationClass)
Gets the first occurrence of an annotation of the given annotation class at method level. |
Annotation |
getMethodOrTypeLevelAnnotation(Method method,
Class<? extends Annotation> annotationClass)
Gets the first annotation of an annotation class on the given method's or type level. |
Annotation[][] |
getMethodParameterAnnotations(Method method,
Class<? extends Annotation> annotationClass)
Gets all parameter annotations of a method. |
Annotation |
getPropertyLevelAnnotation(Field field,
Class<? extends Annotation> annotationClass)
Gets the first occurrence of an annotation of the given annotation class at field level or at method level of the corresponding setter and getter methods. |
Annotation |
getTypeLevelAnnotation(Class<? extends Annotation> annotationClass)
Gets the first occurrence of an annotation of the given annotation class at type level. |
List<Field> |
getVirtualPrimitives()
Gets all virtual primitives of a class. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static ClassManager getInstance(Field field)
field - The field
public static ClassManager getInstance(Method method)
method - The method
public static ClassManager getInstance(Class<?> clazz)
clazz - The class
public Annotation getTypeLevelAnnotation(Class<? extends Annotation> annotationClass)
annotationClass - The annotation class
public Annotation getPropertyLevelAnnotation(Field field,
Class<? extends Annotation> annotationClass)
field - The fieldannotationClass - The annotation class
public Annotation getMethodLevelAnnotation(Method method,
Class<? extends Annotation> annotationClass)
method - The methodannotationClass - The annotation class
public Annotation[][] getMethodParameterAnnotations(Method method,
Class<? extends Annotation> annotationClass)
method - The methodannotationClass - The annotation class
public Annotation getMethodOrTypeLevelAnnotation(Method method,
Class<? extends Annotation> annotationClass)
method - The methodannotationClass - The annotation class
public List<Method> getAllMethodsAnnotatedWith(Class<? extends Annotation> annotationClass)
annotationClass - The annotation class
public List<Field> getAllPropertiesAnnotatedWith(Class<? extends Annotation> annotationClass)
annotationClass - The annotation class
public List<Class<?>> getClassHierarchy()
public List<Class<?>> getInterfaceHierarchy()
public List<Class<?>> getCompleteClassHierarchy()
public List<Method> getCompleteClassHierarchyMethods()
public ConcurrentMap<String,List<Method>> getAllGetterMethods()
public ConcurrentMap<String,List<Method>> getAllSetterMethods()
public List<Field> getActualReferences()
public List<Field> getVirtualPrimitives()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||