public abstract class AbstractGriffonClass extends Object implements GriffonClass
| Modifier and Type | Field and Description | 
|---|---|
protected Set<String> | 
eventsCache  | 
protected Logger | 
log  | 
STANDARD_PROPERTIES| Constructor and Description | 
|---|
AbstractGriffonClass(GriffonApplication application,
                    Class<?> type,
                    String artifactType,
                    String trailingName)  | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
equals(Object obj)  | 
GriffonApplication | 
getApplication()  | 
String | 
getArtifactType()
Returns the artifact type represented by the GriffonClass 
 | 
Class<?> | 
getClazz()
Returns the actual class represented by the GriffonClass 
 | 
String[] | 
getEventNames()  | 
String | 
getFullName()
Returns the full name of the class in the application with the the trailing convention part and with
 the package name. 
 | 
String | 
getLogicalPropertyName()
Returns the logical name of the class as a property name 
 | 
String | 
getName()
Returns the logical name of the class in the application without the trailing convention part if applicable
 and without the package name. 
 | 
String | 
getNaturalName()
Returns the name of the property in natural terms (eg. 
 | 
String | 
getPackageName()
Returns the package name of the class. 
 | 
String[] | 
getPropertiesWithFields()
Returns an array of property names that are backed by a filed with a matching
 name. 
 | 
String | 
getPropertyName()
Returns the name of the class as a property name 
 | 
protected Object | 
getPropertyOrStaticPropertyOrFieldValue(String name,
                                       Class<?> type)
Looks for a property of the reference instance with a given name and type. 
 | 
Class<?> | 
getPropertyType(String name)  | 
Object | 
getPropertyValue(String name)
Gets the initial value of the given property on the class. 
 | 
<T> T | 
getPropertyValue(String name,
                Class<T> type)
Obtains a property value for the given name and type. 
 | 
String | 
getShortName()
Returns the short name of the class without package prefix 
 | 
int | 
hashCode()  | 
boolean | 
hasProperty(String name)
Returns true if the class has the specified property. 
 | 
boolean | 
isReadableProperty(String name)  | 
void | 
resetCaches()  | 
String | 
toString()  | 
@Nonnull public GriffonApplication getApplication()
getApplication in interface GriffonClass@Nullable public Object getPropertyValue(@Nonnull String name)
GriffonClassgetPropertyValue in interface GriffonClassname - The name of the propertypublic boolean hasProperty(@Nonnull String name)
GriffonClasshasProperty in interface GriffonClassname - The name of the property@Nonnull public String getName()
GriffonClassgetName in interface GriffonClass@Nonnull public String getShortName()
GriffonClassgetShortName in interface GriffonClass@Nonnull public String getFullName()
GriffonClassgetFullName in interface GriffonClass@Nonnull public String getPropertyName()
GriffonClassgetPropertyName in interface GriffonClass@Nonnull public String getLogicalPropertyName()
GriffonClassgetLogicalPropertyName in interface GriffonClass@Nonnull public String getNaturalName()
GriffonClassgetNaturalName in interface GriffonClass@Nonnull public String getPackageName()
GriffonClassgetPackageName in interface GriffonClass@Nonnull public Class<?> getClazz()
GriffonClassgetClazz in interface GriffonClass@Nonnull public String getArtifactType()
GriffonClassgetArtifactType in interface GriffonClass@Nullable public <T> T getPropertyValue(@Nonnull String name, @Nonnull Class<T> type)
GriffonClassgetPropertyValue in interface GriffonClassname - The nametype - The typepublic void resetCaches()
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 boolean isReadableProperty(String name)
protected Object getPropertyOrStaticPropertyOrFieldValue(@Nonnull String name, @Nonnull 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: