public class ClassReflectionHelperImpl extends Object implements ClassReflectionHelper
| Constructor and Description |
|---|
ClassReflectionHelperImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
clean(Class<?> clazz)
Removes this class (and all appropriate sub-classes) from the cache
|
MethodWrapper |
createMethodWrapper(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
|
Method |
findPostConstruct(Class<?> clazz,
Class<?> matchingClass)
Finds the postConstruct method on this class
|
Method |
findPreDestroy(Class<?> clazz,
Class<?> matchingClass)
Finds the preDestroy method on this class
|
Set<Field> |
getAllFields(Class<?> clazz)
Gets all fields for a class (taking class heirarchy into account)
|
Set<MethodWrapper> |
getAllMethods(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
|
String |
toString() |
public Set<MethodWrapper> getAllMethods(Class<?> clazz)
ClassReflectionHelpergetAllMethods in interface ClassReflectionHelperclazz - The class to analyze for all methodspublic Set<Field> getAllFields(Class<?> clazz)
ClassReflectionHelpergetAllFields in interface ClassReflectionHelperclazz - The class to analyze for all fieldspublic Method findPostConstruct(Class<?> clazz, Class<?> matchingClass) throws IllegalArgumentException
ClassReflectionHelperfindPostConstruct in interface ClassReflectionHelperclazz - The class to check for the postConstruct methodmatchingClass - The PostConstruct interface, a small performance improvementIllegalArgumentException - If a method marked as postConstruct is invalidpublic Method findPreDestroy(Class<?> clazz, Class<?> matchingClass) throws IllegalArgumentException
ClassReflectionHelperfindPreDestroy in interface ClassReflectionHelperclazz - The class to check for the postConstruct methodmatchingClass - The PostConstruct interface, a small performance improvementIllegalArgumentException - If a method marked as postConstruct is invalidpublic void clean(Class<?> clazz)
ClassReflectionHelperclean in interface ClassReflectionHelperclazz - The class to remove. If null this method does nothingpublic MethodWrapper createMethodWrapper(Method m)
ClassReflectionHelpercreateMethodWrapper in interface ClassReflectionHelperm - A non-null method to create a wrapper frompublic void dispose()
ClassReflectionHelperdispose in interface ClassReflectionHelperpublic int size()
ClassReflectionHelpersize in interface ClassReflectionHelperCopyright © 2009-2015 Oracle Corporation. All Rights Reserved.