public interface GrailsClass extends GrailsApplicationAware
Represents any class in a Grails application.
Type Params | Return Type | Name and description |
---|---|---|
|
public GrailsApplication |
getApplication() The GrailsApplication that this class belongs to |
|
public Class<?> |
getClazz() Returns the actual clazz represented by the GrailsClass. |
|
public String |
getFullName() Returns the full name of the class in the application with the trailing convention part and with the package name. |
|
public String |
getLogicalPropertyName() Returns the logical name of the class as a property name. |
|
public MetaClass |
getMetaClass()
|
|
public String |
getName() Returns the logical name of the class in the application without the trailing convention part if applicable and without the package name. |
|
public String |
getNaturalName() Returns the name of the property in natural terms (eg. |
|
public String |
getPackageName() Returns the package name of the class. |
|
public String |
getPluginName()
|
|
public String |
getPropertyName() Returns the name of the class as a property name. |
|
public Object |
getPropertyValue(String name) Gets the initial value of the given property on the class. |
<T> |
public T |
getPropertyValue(String name, Class<T> type) Obtains a property value for the given name and type |
|
public Object |
getReferenceInstance()
|
|
public String |
getShortName() Returns the short name of the class without package prefix. |
|
public boolean |
hasProperty(String name) Returns true if the class has the specified property. |
|
public boolean |
isAbstract() Whether the class is abstract or not |
|
public Object |
newInstance() Creates a new instance of this class. |
Methods inherited from class | Name |
---|---|
interface GrailsApplicationAware |
setGrailsApplication |
The GrailsApplication that this class belongs to
Returns the actual clazz represented by the GrailsClass.
Returns the full name of the class in the application with the trailing convention part and with the package name.
Returns the logical name of the class as a property name.
Returns the logical name of the class in the application without the trailing convention part if applicable and without the package name.
Returns the name of the property in natural terms (eg. 'lastName' becomes 'Last Name')
Returns the package name of the class.
Returns the name of the class as a property name.
Gets the initial value of the given property on the class.
name
- The name of the propertyObtains a property value for the given name and type
name
- The nametype
- The type
Returns the short name of the class without package prefix.
Returns true if the class has the specified property.
name
- The name of the propertyWhether the class is abstract or not
Creates a new instance of this class. This method can be used as factory method in the Spring application context.