@java.lang.SuppressWarnings("rawtypes") public class ClassPropertyFetcher extends java.lang.Object
Reads the properties of a class in an optimized manner avoiding exceptions.
Modifiers | Name | Description |
---|---|---|
static java.util.Set |
EXCLUDED_PROPERTIES |
Type Params | Return Type | Name and description |
---|---|---|
|
protected void |
addBeanProperty(java.util.List<java.beans.PropertyDescriptor> propertyDescriptors, groovy.lang.MetaProperty property) |
|
public static void |
clearCache()
|
|
public static java.beans.PropertyDescriptor |
createPropertyDescriptor(java.lang.Class declaringClass, groovy.lang.MetaProperty property) Creates a PropertyDescriptor from a MetaBeanProperty |
|
public static ClassPropertyFetcher |
forClass(java.lang.Class c) |
|
public java.lang.reflect.Field |
getDeclaredField(java.lang.String name) |
|
public static java.lang.Object |
getInstancePropertyValue(java.lang.Object instance, java.lang.String name) |
|
public java.lang.Class |
getJavaClass()
|
|
public java.util.List<groovy.lang.MetaProperty> |
getMetaProperties()
|
|
public java.util.List<java.beans.PropertyDescriptor> |
getPropertiesAssignableFromType(java.lang.Class assignableType) |
|
public java.util.List<java.beans.PropertyDescriptor> |
getPropertiesAssignableToType(java.lang.Class assignableType) |
|
public java.util.List<java.beans.PropertyDescriptor> |
getPropertiesOfType(java.lang.Class javaClass) |
|
public java.beans.PropertyDescriptor |
getPropertyDescriptor(java.lang.String name) |
|
public java.beans.PropertyDescriptor[] |
getPropertyDescriptors()
|
|
public java.lang.Class |
getPropertyType(java.lang.String name) |
|
public java.lang.Class |
getPropertyType(java.lang.String name, boolean onlyInstanceProperties) |
|
public static java.lang.Class<?> |
getPropertyType(java.lang.Class<?> cls, java.lang.String propertyName) |
|
public java.lang.Object |
getPropertyValue(java.lang.String name) |
|
public java.lang.Object |
getPropertyValue(java.lang.Object instance, java.lang.String name) |
<T> |
public T |
getPropertyValue(java.lang.String name, java.lang.Class<T> c) |
|
public java.lang.Object |
getReference()
|
<T> |
public T |
getStaticPropertyValue(java.lang.String name, java.lang.Class<T> c) |
<T> |
public static T |
getStaticPropertyValue(java.lang.Class clazz, java.lang.String name, java.lang.Class<T> requiredType) |
<T> |
public 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. |
<T> |
public static java.util.List<T> |
getStaticPropertyValuesFromInheritanceHierarchy(java.lang.Class theClass, java.lang.String name, java.lang.Class<T> requiredTyped) 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. |
|
public boolean |
isReadableProperty(java.lang.String name) |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long), java.lang.Object#wait(long, int), 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() |
Creates a PropertyDescriptor from a MetaBeanProperty
property
- The bean property
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)T
- Required type of the property.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.requiredTyped
- Required type of the property (including derived types)T
- Required type of the property.