|
Griffon 0.9.5-rc2 | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.griffon.runtime.core.AbstractGriffonClass
public abstract class AbstractGriffonClass extends Object
Abstract base class for Griffon types that provides common functionality for evaluating conventions within classes
Field Summary | |
---|---|
private GriffonApplication |
app
|
private ClassPropertyFetcher |
classPropertyFetcher
|
private Class |
clazz
|
protected Set |
eventsCache
|
private String |
fullName
|
protected org.slf4j.Logger |
log
|
private String |
logicalPropertyName
|
private String |
name
|
private String |
naturalName
|
private String |
packageName
|
private String |
propertyName
|
private String |
shortName
|
private String |
type
|
Constructor Summary | |
AbstractGriffonClass(GriffonApplication app, Class clazz, String type, String trailingName)
|
Methods inherited from class Object | |
---|---|
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Field Detail |
---|
private final GriffonApplication app
private final ClassPropertyFetcher classPropertyFetcher
private final Class clazz
protected final Set eventsCache
private final String fullName
protected final org.slf4j.Logger log
private final String logicalPropertyName
private final String name
private final String naturalName
private final String packageName
private final String propertyName
private final String shortName
private final String type
Constructor Detail |
---|
public AbstractGriffonClass(GriffonApplication app, Class clazz, String type, String trailingName)
Contructor to be used by all child classes to create a new instance and get the name right.
Method Detail |
---|
public boolean equals(Object obj)
public GriffonApplication getApp()
public String getArtifactType()
public Class getClazz()
public String[] getEventNames()
public String getFullName()
private Object getGroovyProperty(String propName, Class type, boolean onlyStatic)
public String getLogicalPropertyName()
public MetaClass getMetaClass()
public MetaProperty[] getMetaProperties()
public String getName()
public String getNaturalName()
public String getPackageName()
public String[] getPropertiesWithFields()
Fields must be private and non-static. Names will be returned in the order they are declared in the class, starting from the deepest class in the class hierarchy up to the topmost superclass != null
public PropertyDescriptor[] getPropertyDescriptors()
public String getPropertyName()
protected Object getPropertyOrStaticPropertyOrFieldValue(@SuppressWarnings("hiding") String name, 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 Class getPropertyType(String name)
public Object getPropertyValue(String propName, Class type)
public Object getPropertyValue(String name)
public Object getPropertyValueObject(String propertyNAme)
public Object getReferenceInstance()
public String getShortName()
public Object getStaticPropertyValue(String propName, Class type)
public boolean hasMetaMethod(String name)
public boolean hasMetaMethod(String name, Object[] args)
public boolean hasMetaProperty(String name)
public boolean hasProperty(String propName)
public int hashCode()
public boolean isClosureMetaProperty(MetaProperty property)
public boolean isReadableProperty(String name)
public Object newInstance()
public void resetCaches()
@SuppressWarnings("unchecked") private Object returnOnlyIfInstanceOf(Object value, Class type)
public void setMetaClass(MetaClass metaClass)
public String toString()
public void updateMetaClass(Closure updater)
Groovy Documentation