public abstract class AbstractGrailsClass extends Object implements GrailsClass
Abstract base class for Grails types that provides common functionality for evaluating conventions within classes.
Modifiers | Name | Description |
---|---|---|
protected GrailsApplication |
grailsApplication |
Constructor and description |
---|
AbstractGrailsClass(Class<?> clazz, String trailingName) Used by all child classes to create a new instance and get the name right. |
Type Params | Return Type | Name and description |
---|---|---|
|
public GrailsApplication |
getApplication() |
|
public Class<?> |
getClazz() |
|
public String |
getFullName() |
|
public String |
getLogicalPropertyName() |
|
public MetaClass |
getMetaClass()
|
|
public List<MetaProperty> |
getMetaProperties() |
|
public String |
getName() |
|
public String |
getNaturalName() |
|
public String |
getPackageName() |
|
public String |
getPluginName() |
|
public PropertyDescriptor[] |
getPropertyDescriptors()
|
|
public String |
getPropertyName() |
<T> |
protected T |
getPropertyOrStaticPropertyOrFieldValue(String name, Class<T> type) |
|
public Class<?> |
getPropertyType(String typeName) |
<T> |
public T |
getPropertyValue(String propName, Class<T> type) Get the value of the named property, with support for static properties in both Java and Groovy classes (which as of Groovy JSR 1.0 RC 01 only have getters in the metaClass) |
|
public Object |
getPropertyValue(String propName) |
|
public Object |
getPropertyValueObject(String propertyNAme) |
|
public Object |
getReferenceInstance() |
|
public String |
getShortName() |
<T> |
public T |
getStaticPropertyValue(String propName, Class<T> type) Get the value of the named static property. |
|
public boolean |
hasMetaMethod(String methodName) |
|
public boolean |
hasMetaMethod(String methodName, Object[] args) |
|
public boolean |
hasMetaProperty(String propName) |
|
public boolean |
hasProperty(String propName) |
|
public boolean |
isAbstract() |
|
public boolean |
isReadableProperty(String propName) |
|
public Object |
newInstance() |
|
public void |
setGrailsApplication(GrailsApplication grailsApplication) |
|
public String |
toString() |
Looks for a property of the reference instance with a given name and type.
If found its value is returned. We follow the Java bean conventions with augmentation for groovy support and static fields/properties. We will therefore match, in this order:
Get the value of the named property, with support for static properties in both Java and Groovy classes (which as of Groovy JSR 1.0 RC 01 only have getters in the metaClass)
Get the value of the named static property.