|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.grails.commons.AbstractGrailsClass
public abstract class AbstractGrailsClass
Abstract base class for Grails types that provides common functionality for evaluating conventions within classes.
Constructor Summary | |
AbstractGrailsClass(java.lang.Class clazz, java.lang.String trailingName)
Used by all child classes to create a new instance and get the name right. |
Method Summary | |
---|---|
java.lang.Class
|
getClazz()
|
java.lang.String
|
getFullName()
|
java.lang.String
|
getLogicalPropertyName()
|
groovy.lang.MetaClass
|
getMetaClass()
@return the metaClass |
java.lang.String
|
getName()
|
java.lang.String
|
getNaturalName()
|
java.lang.String
|
getPackageName()
|
PropertyDescriptor[]
|
getPropertyDescriptors()
|
java.lang.String
|
getPropertyName()
|
protected java.lang.Object
|
getPropertyOrStaticPropertyOrFieldValue(java.lang.String name, java.lang.Class type)
Looks for a property of the reference instance with a given name and type. |
java.lang.Class
|
getPropertyType(java.lang.String typeName)
|
T
|
getPropertyValue(java.lang.String propName, java.lang.Class 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) |
java.lang.Object
|
getPropertyValue(java.lang.String propName)
|
java.lang.Object
|
getPropertyValueObject(java.lang.String propertyNAme)
|
BeanWrapper
|
getReference()
Used to get configured property values. |
java.lang.Object
|
getReferenceInstance()
|
java.lang.String
|
getShortName()
|
T
|
getStaticPropertyValue(java.lang.String propName, java.lang.Class type)
Get the value of the named static property. |
boolean
|
hasMetaMethod(java.lang.String methodName)
|
boolean
|
hasMetaMethod(java.lang.String methodName, Object[] args)
|
boolean
|
hasMetaProperty(java.lang.String propName)
|
boolean
|
hasProperty(java.lang.String propName)
|
boolean
|
isReadableProperty(java.lang.String propName)
|
java.lang.Object
|
newInstance()
|
java.lang.String
|
toString()
|
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), 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() |
Constructor Detail |
---|
public AbstractGrailsClass(java.lang.Class clazz, java.lang.String trailingName)
clazz
- the Grails classtrailingName
- the trailing part of the name for this class type
Method Detail |
---|
public java.lang.Class getClazz()
public java.lang.String getFullName()
public java.lang.String getLogicalPropertyName()
public groovy.lang.MetaClass getMetaClass()
public java.lang.String getName()
public java.lang.String getNaturalName()
public java.lang.String getPackageName()
public PropertyDescriptor[] getPropertyDescriptors()
public java.lang.String getPropertyName()
protected java.lang.Object getPropertyOrStaticPropertyOrFieldValue(@SuppressWarnings("hiding") java.lang.String name, java.lang.Class type)
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:
public java.lang.Class getPropertyType(java.lang.String typeName)
public T getPropertyValue(java.lang.String propName, java.lang.Class type)
public java.lang.Object getPropertyValue(java.lang.String propName)
public java.lang.Object getPropertyValueObject(java.lang.String propertyNAme)
@Deprecated public BeanWrapper getReference()
public java.lang.Object getReferenceInstance()
public java.lang.String getShortName()
public T getStaticPropertyValue(java.lang.String propName, java.lang.Class type)
public boolean hasMetaMethod(java.lang.String methodName)
public boolean hasMetaMethod(java.lang.String methodName, Object[] args)
public boolean hasMetaProperty(java.lang.String propName)
public boolean hasProperty(java.lang.String propName)
public boolean isReadableProperty(java.lang.String propName)
public java.lang.Object newInstance()
@Override public java.lang.String toString()
Groovy Documentation