GriffonArtifact (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 GriffonArtifact

    griffon.core.ResourceHandler
      griffon.core.ApplicationHandler
          griffon.core.GriffonArtifact
              griffon.core.MVCHandler
                  griffon.core.ThreadingHandler

All Superinterfaces:
  ResourceHandler, ApplicationHandler, MVCHandler, ThreadingHandler

    public interface GriffonArtifact
    extends ApplicationHandler, MVCHandler, ResourceHandler, ThreadingHandler

Identifies an object as a Griffon artifact.

Griffon artifacts are usually placed under the special "griffon-app" directory that every application has. They are also grouped together in in a subdirectory that clearly identifies their nature. For example "griffon-app/controllers" contains all Controller artifacts.

Implementing this interface for a custom artifact definition is highly recommended but not enforced.

Authors:
  Andres Almiray

Since:
  0.9.1

Method Summary
`GriffonClass` | `getGriffonClass()` Returns the `GriffonClass` associated with this artifact.
`org.slf4j.Logger` | `getLog()` Returns a Logger instance suitable for this Artifact.
`MetaClass` | `getMetaClass()` Gets the `MetaClass` of this artifact.
`Object` | `newInstance(Class clazz, String type)` Creates a new instance of the specified class and type.

Methods inherited from interface ResourceHandler
getResourceAsStream, getResourceAsURL, getResources

Methods inherited from interface ApplicationHandler
getApp

Methods inherited from interface MVCHandler
buildMVCGroup, buildMVCGroup, buildMVCGroup, buildMVCGroup, buildMVCGroup, buildMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, createMVCGroup, destroyMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup, withMVCGroup

Methods inherited from interface ThreadingHandler
execAsync, execFuture, execFuture, execFuture, execFuture, execInsideUIAsync, execInsideUISync, execOutside, execOutsideUI, execSync, isUIThread

Method Detail

### getGriffonClass

    public GriffonClass getGriffonClass()

  Returns the `GriffonClass` associated with this artifact.
  Returns:
    the `GriffonClass` associated with this artifact

### getLog

    public org.slf4j.Logger getLog()

  Returns a Logger instance suitable for this Artifact.

  The Logger is configured with the following prefix 'griffon.app.<type>' where <type> stands for the artifact's type.

  Example: the Logger for class com.acme.SampleController will be configured for 'griffon.app.controller.com.acme.SampleController'.

  Returns:
    a Logger instance associated with this artifact.
  Since:
    0.9.2

### getMetaClass

    public MetaClass getMetaClass()

  Gets the `MetaClass` of this artifact.

  It should delegate to its GriffonClass to get the real MetaClass.

  Returns:
    The MetaClass for this Griffon class

### newInstance

    public Object newInstance(Class clazz, String type)

  Creates a new instance of the specified class and type.
  Parameters:
    `clazz` - the Class to be instantiated
    `type` - a logical type, such as 'controller'. May be null.
  Returns:
    the newly created instance

Groovy Documentation