GriffonClass (Griffon 0.9.5-rc2)
Date: 2012-03-09

Overview | Package | Class | Deprecated | Index | Help
| Griffon 0.9.5-rc2
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD

## griffon.core
[Java] Interface GriffonClass

    griffon.core.ApplicationHandler
      griffon.core.GriffonClass

All Superinterfaces:
  ApplicationHandler

    public interface GriffonClass
    extends ApplicationHandler

Represents any class in a Griffon application that is related to an artifact.

While `GriffonArtifact` points to the real artifact instance, this class points to the meta information that can be obtained from such artifact.

Authors:
  Steven Devijver (Grails 0.1)
  Graeme Rocher (Grails 0.1)
  Andres Almiray

Field Summary
`Set` | `STANDARD_PROPERTIES`

Method Summary
`String` | `getArtifactType()` Returns the artifact type represented by the GriffonClass
`Class` | `getClazz()` Returns the actual class represented by the GriffonClass
`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
`MetaClass` | `getMetaClass()` Gets the `MetaClass` of this GriffonClass.
`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` | `getPropertyName()` Returns the name of the class as a property name
`Object` | `getPropertyValue(String name)` Gets the initial value of the given property on the class.
`Object` | `getPropertyValue(String name, Class type)` Obtains a property value for the given name and type.
`Object` | `getReferenceInstance()` @return Sample (reference) instance for this Griffon class
`String` | `getShortName()` Returns the short name of the class without package prefix
`boolean` | `hasProperty(String name)` Returns true if the class has the specified property.
`Object` | `newInstance()` Creates a new instance of this class.

Methods inherited from interface ApplicationHandler
getApp

Field Detail

### STANDARD_PROPERTIES

    public Set STANDARD_PROPERTIES

Method Detail

### getArtifactType

    public String getArtifactType()

  Returns the artifact type represented by the GriffonClass
  Returns:
    the artifact type, i.e. "controller".

### getClazz

    public Class getClazz()

  Returns the actual class represented by the GriffonClass
  Returns:
    the class

### getFullName

    public String getFullName()

  Returns the full name of the class in the application with the the trailing convention part and with the package name.
  Returns:
    the full name

### getLogicalPropertyName

    public String getLogicalPropertyName()

  Returns the logical name of the class as a property name
  Returns:
    The logical property name

### getMetaClass

    public MetaClass getMetaClass()

  Gets the `MetaClass` of this GriffonClass.
  Returns:
    The MetaClass for this Griffon class

### getName

    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.
  Returns:
    the logical name

### getNaturalName

    public String getNaturalName()

  Returns the name of the property in natural terms (eg. 'lastName' becomes 'Last Name').

  Returns:
    The natural property name

### getPackageName

    public String getPackageName()

  Returns the package name of the class.
  Returns:
    the package name

### getPropertyName

    public String getPropertyName()

  Returns the name of the class as a property name
  Returns:
    The property name representation

### getPropertyValue

    public Object getPropertyValue(String name)

  Gets the initial value of the given property on the class.
  Parameters:
    `name` - The name of the property
  Returns:
    The initial value

### getPropertyValue

    public Object getPropertyValue(String name, Class type)

  Obtains a property value for the given name and type.
  Parameters:
    `name` - The name
    `type` - The type
  Returns:
    The property value

### getReferenceInstance

    public Object getReferenceInstance()

  Returns:
    Sample (reference) instance for this Griffon class

### getShortName

    public String getShortName()

  Returns the short name of the class without package prefix
  Returns:
    The short name

### hasProperty

    public boolean hasProperty(String name)

  Returns true if the class has the specified property.
  Parameters:
    `name` - The name of the property
  Returns:
    True if it does

### newInstance

    public Object newInstance()

  Creates a new instance of this class.

  This method can be used as factory method in the Spring application context.
  Returns:
    a new instance of this class

Groovy Documentation