public interface ClassReflectionHelper
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
|
Set<MethodWrapper> getAllMethods(Class<?> clazz)
clazz
- The class to analyze for all methodsMethodWrapper createMethodWrapper(Method m)
m
- A non-null method to create a wrapper fromSet<Field> getAllFields(Class<?> clazz)
clazz
- The class to analyze for all fieldsMethod findPostConstruct(Class<?> clazz, Class<?> matchingClass) throws IllegalArgumentException
clazz
- The class to check for the postConstruct methodmatchingClass
- The PostConstruct interface, a small performance improvementIllegalArgumentException
- If a method marked as postConstruct is invalidMethod findPreDestroy(Class<?> clazz, Class<?> matchingClass) throws IllegalArgumentException
clazz
- The class to check for the postConstruct methodmatchingClass
- The PostConstruct interface, a small performance improvementIllegalArgumentException
- If a method marked as postConstruct is invalidvoid clean(Class<?> clazz)
clazz
- The class to remove. If null this method does nothingvoid dispose()
int size()
Copyright © 2009-2017, Oracle and/or its affiliates. All Rights Reserved.