org.codehaus.groovy.grails.commons
Interface ArtefactInfo

All Known Implementing Classes:
DefaultArtefactInfo

public interface ArtefactInfo

Holder for all the class-related info and structures relating to an Artefact.

Author:
Marc Palmer ([email protected]), Graeme Rocher

Method Summary
 Class[] getClasses()
          Gets you the array of all artefact Class(es), the original classes loaded that represent the artefacts.
 Map getClassesByName()
          Gets you the unmodifiable Map of all artefact Class(es), the actual classes implementing the artefact.
 GrailsClass getGrailsClass(String name)
          Retrieves the GrailsClass representing a named artefact.
 GrailsClass getGrailsClassByLogicalPropertyName(String logicalName)
          Retrieves a Grails class by its logical property name.
 GrailsClass[] getGrailsClasses()
          Gets you the array of all artefact GrailsClass(es), the classes used to track information about the artefact.
 Map getGrailsClassesByName()
          Gets you the unmodifiable Map of all artefact GrailsClass(es), the classes that store extra state relating to the artefact.
 

Method Detail

getClasses

Class[] getClasses()
Gets you the array of all artefact Class(es), the original classes loaded that represent the artefacts.

Returns:
The array, which may be empty but never null.

getGrailsClasses

GrailsClass[] getGrailsClasses()
Gets you the array of all artefact GrailsClass(es), the classes used to track information about the artefact.

Returns:
The array, which may be empty but never null.

getClassesByName

Map getClassesByName()
Gets you the unmodifiable Map of all artefact Class(es), the actual classes implementing the artefact.

The Map is keyed by class name, i.e. "BookController"

Returns:
The Map, which may be empty but never null.

getGrailsClassesByName

Map getGrailsClassesByName()

Gets you the unmodifiable Map of all artefact GrailsClass(es), the classes that store extra state relating to the artefact.

The Map is keyed by class name, i.e. "BookController"

Returns:
The Map, which may be empty but never null.

getGrailsClass

GrailsClass getGrailsClass(String name)

Retrieves the GrailsClass representing a named artefact.

From the GrailsClass you can get to the original artefact Class using getClazz().

Parameters:
name - The name of the artefact, i.e. "BookController"
Returns:
The Map, which may be empty but never null.

getGrailsClassByLogicalPropertyName

GrailsClass getGrailsClassByLogicalPropertyName(String logicalName)
Retrieves a Grails class by its logical property name. For example "BookController" would be "book".

Parameters:
logicalName - The logical name
Returns:
A GrailsClass or null