## 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

Nested Class Summary
`(package private) static class` `ClassPropertyFetcher.FieldReaderFetcher`
`(package private) static class` `ClassPropertyFetcher.GetterPropertyFetcher`
`(package private) static interface` `ClassPropertyFetcher.PropertyFetcher`
`static interface` `ClassPropertyFetcher.ReferenceInstanceCallback`

Field Summary
`(package private) Map<String,ClassPropertyFetcher.PropertyFetcher>` `instanceFetchers`
`(package private) Map<String,ClassPropertyFetcher.PropertyFetcher>` `staticFetchers`

Constructor Summary
`ClassPropertyFetcher(Class clazz, ClassPropertyFetcher.ReferenceInstanceCallback callback)`

Method Summary
`Class` `getPropertyType(String name)`
`Class` `getPropertyType(String name, boolean onlyInstanceProperties)`
`Object` `getPropertyValue(String name)`
`Object` `getPropertyValue(String name, boolean onlyInstanceProperties)`
`boolean` `isReadableProperty(String name)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### staticFetchers

    final Map<String,ClassPropertyFetcher.PropertyFetcher> staticFetchers

### instanceFetchers

    final Map<String,ClassPropertyFetcher.PropertyFetcher> instanceFetchers

Constructor Detail

### ClassPropertyFetcher

    ClassPropertyFetcher(Class clazz,
                         ClassPropertyFetcher.ReferenceInstanceCallback callback)

Method Detail

### isReadableProperty

    public boolean isReadableProperty(String name)

### getPropertyValue

    public Object getPropertyValue(String name)

### getPropertyValue

    public Object getPropertyValue(String name,
                                   boolean onlyInstanceProperties)

### getPropertyType

    public Class getPropertyType(String name)

### getPropertyType

    public Class getPropertyType(String name,
                                 boolean onlyInstanceProperties)

Copyright (c) 2005-2009 The Grails project