Groovy Documentation

org.codehaus.groovy.grails.commons
[Java] Class ClassPropertyFetcher

java.lang.Object
  org.codehaus.groovy.grails.commons.ClassPropertyFetcher

public class ClassPropertyFetcher
extends java.lang.Object

Accesses class "properties": static fields, static getters, instance fields or instance getters. Method and Field instances are cached for fast access.

Authors:
Lari Hotari, Sagire Software Oy
Graeme Rocher


Nested Class Summary
static interface ClassPropertyFetcher.ReferenceInstanceCallback

 
Method Summary
static void clearClassPropertyFetcherCache()

static ClassPropertyFetcher forClass(java.lang.Class c)

static ClassPropertyFetcher forClass(java.lang.Class c, ClassPropertyFetcher.ReferenceInstanceCallback callback)

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.String name, java.lang.Class c)

java.lang.Object getReference()

java.lang.Object getStaticPropertyValue(java.lang.String name, java.lang.Class c)

boolean isReadableProperty(java.lang.String name)

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#wait(long), 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()
 

Method Detail

clearClassPropertyFetcherCache

public static void clearClassPropertyFetcherCache()


forClass

public static ClassPropertyFetcher forClass(java.lang.Class c)


forClass

public static ClassPropertyFetcher forClass(java.lang.Class c, ClassPropertyFetcher.ReferenceInstanceCallback callback)


getPropertyDescriptors

public java.beans.PropertyDescriptor[] getPropertyDescriptors()


getPropertyType

public java.lang.Class getPropertyType(java.lang.String name)


getPropertyType

public java.lang.Class getPropertyType(java.lang.String name, boolean onlyInstanceProperties)


getPropertyValue

public java.lang.Object getPropertyValue(java.lang.String name)


getPropertyValue

public java.lang.Object getPropertyValue(java.lang.String name, boolean onlyInstanceProperties)


getPropertyValue

public java.lang.Object getPropertyValue(java.lang.String name, java.lang.Class c)


getReference

public java.lang.Object getReference()


getStaticPropertyValue

public java.lang.Object getStaticPropertyValue(java.lang.String name, java.lang.Class c)


isReadableProperty

public boolean isReadableProperty(java.lang.String name)


 

Groovy Documentation