Reads the properties of a class in an optimized manner avoiding exceptions.
Modifiers | Name | Description |
---|---|---|
interface |
ClassPropertyFetcher.ReferenceInstanceCallback |
Type Params | Return Type | Name and description |
---|---|---|
|
static void |
clearCache() |
|
static ClassPropertyFetcher |
forClass(java.lang.Class c) |
|
java.lang.reflect.Field |
getDeclaredField(java.lang.String name) |
|
java.lang.Class |
getJavaClass() @return The Java that this ClassPropertyFetcher was constructor for |
|
java.util.List<java.beans.PropertyDescriptor> |
getPropertiesAssignableFromType(java.lang.Class assignableType) |
|
java.util.List<java.beans.PropertyDescriptor> |
getPropertiesAssignableToType(java.lang.Class assignableType) |
|
java.util.List<java.beans.PropertyDescriptor> |
getPropertiesOfType(java.lang.Class javaClass) |
|
java.beans.PropertyDescriptor |
getPropertyDescriptor(java.lang.String name) |
|
java.beans.PropertyDescriptor[] |
getPropertyDescriptors() |
|
java.lang.Class |
getPropertyType(java.lang.String name) |
|
java.lang.Class |
getPropertyType(java.lang.String name, boolean onlyInstanceProperties) |
|
java.lang.Object |
getPropertyValue(java.lang.String name) |
|
java.lang.Object |
getPropertyValue(java.lang.String name, boolean onlyInstanceProperties) |
|
java.lang.Object |
getPropertyValue(java.lang.Object instance, java.lang.String name) |
<T> |
T |
getPropertyValue(java.lang.String name, java.lang.Class<T> c) |
|
java.lang.Object |
getReference() |
<T> |
T |
getStaticPropertyValue(java.lang.String name, java.lang.Class<T> c) |
<T> |
java.util.List<T> |
getStaticPropertyValuesFromInheritanceHierarchy(java.lang.String name, java.lang.Class<T> c) Get the list of property values for this static property from the whole inheritance hierarchy, starting from the most derived version of the property ending with the base class. |
|
boolean |
isReadableProperty(java.lang.String name) |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Get the list of property values for this static property from the whole inheritance hierarchy, starting from the most derived version of the property ending with the base class. There are entries for each extant version of the property in turn, so if you have a 10-deep inheritance hierarchy, you may get 0+ values returned, one per class in the hierarchy that has the property declared (and of the correct type).
name
- Name of the property.c
- Required type of the property (including derived types)
- Required type of the property.