|
Griffon 0.9.5-rc2 | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.griffon.runtime.core.ClassPropertyFetcher
public class ClassPropertyFetcher extends Object
Accesses class "properties": static fields, static getters, instance fields or instance getters
Method and Field instances are cached for fast accessNested Class Summary | |
---|---|
static interface |
ClassPropertyFetcher.FieldCallback
|
static class |
ClassPropertyFetcher.FieldReaderFetcher
|
static class |
ClassPropertyFetcher.GetterPropertyFetcher
|
static interface |
ClassPropertyFetcher.MethodCallback
|
static interface |
ClassPropertyFetcher.PropertyFetcher
|
static interface |
ClassPropertyFetcher.ReferenceInstanceCallback
|
Field Summary | |
---|---|
private static Map |
cachedClassPropertyFetchers
|
private ClassPropertyFetcher.ReferenceInstanceCallback |
callback
|
private Class |
clazz
|
Map |
instanceFetchers
|
private String[] |
propertiesWithFields
|
private PropertyDescriptor[] |
propertyDescriptors
|
Map |
staticFetchers
|
Constructor Summary | |
ClassPropertyFetcher(Class clazz, ClassPropertyFetcher.ReferenceInstanceCallback callback)
|
Methods inherited from class Object | |
---|---|
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Field Detail |
---|
private static Map cachedClassPropertyFetchers
private final ClassPropertyFetcher.ReferenceInstanceCallback callback
private final Class clazz
final Map instanceFetchers
private String[] propertiesWithFields
private PropertyDescriptor[] propertyDescriptors
final Map staticFetchers
Constructor Detail |
---|
ClassPropertyFetcher(Class clazz, ClassPropertyFetcher.ReferenceInstanceCallback callback)
Method Detail |
---|
public static void clearClassPropertyFetcherCache()
public static ClassPropertyFetcher forClass(Class c)
public static ClassPropertyFetcher forClass(Class c, ClassPropertyFetcher.ReferenceInstanceCallback callback)
public String[] getPropertiesWithFields()
public PropertyDescriptor[] getPropertyDescriptors()
public Class getPropertyType(String name)
public Class getPropertyType(String name, boolean onlyInstanceProperties)
public Object getPropertyValue(String name)
public Object getPropertyValue(String name, boolean onlyInstanceProperties)
public Object getPropertyValue(String name, Class c)
private Object getPropertyValueWithFetcher(String name, ClassPropertyFetcher.PropertyFetcher fetcher)
public Object getReference()
public Object getStaticPropertyValue(String name, Class c)
private void init()
public boolean isReadableProperty(String name)
private static void makeAccessible(AccessibleObject obj)
private List resolveAllClasses(Class c)
private ClassPropertyFetcher.PropertyFetcher resolveFetcher(String name, boolean onlyInstanceProperties)
@SuppressWarnings("unchecked") private Object returnOnlyIfInstanceOf(Object value, Class type)
Groovy Documentation