|
Griffon 0.9.5-rc2 | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD |
griffon.core.ResourceHandlergriffon.core.ApplicationHandler
griffon.core.GriffonArtifact
griffon.core.MVCHandler
griffon.core.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.
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 ThreadingHandler | |
---|---|
execAsync, execFuture, execFuture, execFuture, execFuture, execInsideUIAsync, execInsideUISync, execOutside, execOutsideUI, execSync, isUIThread |
Method Detail |
---|
public GriffonClass getGriffonClass()
public org.slf4j.Logger getLog()
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'.
public MetaClass getMetaClass()
It should delegate to its GriffonClass to get the real MetaClass.
public Object newInstance(Class clazz, String type)
clazz
- the Class to be instantiatedtype
- a logical type, such as 'controller'. May be null.
Groovy Documentation