Every Griffon application exposes all information about its artifacts and addons via a pair of helper classes

ArtifactManager

The ArtifactManager class provides methods to evaluate the conventions within the project and internally stores references to all classes within a GriffonApplication using subclasses of GriffonClass class.

A GriffonClass represents a physical Griffon resources such as a controller or a service. For example to get all GriffonClass instances you can call:

app.artifactManager.allClasses.each { println it.name }

There are a few "magic" properties that the ArtifactManager instance possesses that allow you to narrow the type of artifact you are interested in. For example if you only need to deal with controllers you can do:

app.artifactManager.controllerClasses.each { println it.name }

Dynamic method conventions are as follows:

The GriffonClass interface itself provides a number of useful methods that allow you to further evaluate and work with the conventions. These include:

For a full reference refer to the javadoc API.

AddonManager

The AddonManager class is responsible for holding references to all addons (which are of type griffon.core.GriffonAddon), as well as providing metainformation on each addon via an addon descriptor. The latter can be used to know at runtime the name and version of a particular addon, useful for building a dynamic About dialog for example.

All addons have the same behavior which is explained in detail in section 12.6 Addons.