org.codehaus.groovy.grails.commons
Class ClassPropertyFetcher
java.lang.Object
org.codehaus.groovy.grails.commons.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 access.
- Author:
- Lari Hotari, Sagire Software Oy, Graeme Rocher
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
staticFetchers
final Map<String,ClassPropertyFetcher.PropertyFetcher> staticFetchers
instanceFetchers
final Map<String,ClassPropertyFetcher.PropertyFetcher> instanceFetchers
ClassPropertyFetcher
ClassPropertyFetcher(Class<?> clazz,
ClassPropertyFetcher.ReferenceInstanceCallback callback)
clearClassPropertyFetcherCache
public static void clearClassPropertyFetcherCache()
forClass
public static ClassPropertyFetcher forClass(Class<?> c)
forClass
public static ClassPropertyFetcher forClass(Class<?> c,
ClassPropertyFetcher.ReferenceInstanceCallback callback)
getReference
public Object getReference()
getPropertyDescriptors
public PropertyDescriptor[] getPropertyDescriptors()
isReadableProperty
public boolean isReadableProperty(String name)
getPropertyValue
public Object getPropertyValue(String name)
getPropertyValue
public Object getPropertyValue(String name,
boolean onlyInstanceProperties)
getStaticPropertyValue
public <T> T getStaticPropertyValue(String name,
Class<T> c)
getPropertyValue
public <T> T getPropertyValue(String name,
Class<T> c)
getPropertyType
public Class<?> getPropertyType(String name)
getPropertyType
public Class<?> getPropertyType(String name,
boolean onlyInstanceProperties)