public interface ClassReflectionHelper
Modifier and Type | Method and Description |
---|---|
void |
clean(java.lang.Class<?> clazz)
Removes this class (and all appropriate sub-classes) from the cache
|
MethodWrapper |
createMethodWrapper(java.lang.reflect.Method m)
Creates a method wrapper from the given method
|
void |
dispose()
Releases the entire cache, though the ClassReflectionHelper is
still usable after calling dispose
|
java.lang.reflect.Method |
findPostConstruct(java.lang.Class<?> clazz,
java.lang.Class<?> matchingClass)
Finds the postConstruct method on this class
|
java.lang.reflect.Method |
findPreDestroy(java.lang.Class<?> clazz,
java.lang.Class<?> matchingClass)
Finds the preDestroy method on this class
|
java.util.Set<java.lang.reflect.Field> |
getAllFields(java.lang.Class<?> clazz)
Gets all fields for a class (taking class heirarchy into account)
|
java.util.Set<MethodWrapper> |
getAllMethods(java.lang.Class<?> clazz)
Gets all methods for a class (taking class heirarchy into account)
|
int |
size()
Returns an approximation of the current size of the cache
|
java.util.Set<MethodWrapper> getAllMethods(java.lang.Class<?> clazz)
clazz
- The class to analyze for all methodsMethodWrapper createMethodWrapper(java.lang.reflect.Method m)
m
- A non-null method to create a wrapper fromjava.util.Set<java.lang.reflect.Field> getAllFields(java.lang.Class<?> clazz)
clazz
- The class to analyze for all fieldsjava.lang.reflect.Method findPostConstruct(java.lang.Class<?> clazz, java.lang.Class<?> matchingClass) throws java.lang.IllegalArgumentException
clazz
- The class to check for the postConstruct methodmatchingClass
- The PostConstruct interface, a small performance improvementjava.lang.IllegalArgumentException
- If a method marked as postConstruct is invalidjava.lang.reflect.Method findPreDestroy(java.lang.Class<?> clazz, java.lang.Class<?> matchingClass) throws java.lang.IllegalArgumentException
clazz
- The class to check for the postConstruct methodmatchingClass
- The PostConstruct interface, a small performance improvementjava.lang.IllegalArgumentException
- If a method marked as postConstruct is invalidvoid clean(java.lang.Class<?> clazz)
clazz
- The class to remove. If null this method does nothingvoid dispose()
int size()