5.7.3 Artifact Types

All Griffon artifacts share common behavior. This behavior is captured by an interface named griffon.core.GriffonArtifact. Additional interfaces with more explicit behavior exist per each artifact type. The following is a list of the basic types and their corresponding interface

- Model -> griffon.core.GriffonModel
- View -> griffon.core.GriffonView
- Controller -> griffon.core.GriffonController
- Service -> griffon.core.GriffonService

Starting with Griffon 0.9.1 the compiler will make sure that each artifact implements its corresponding interface via AST injection. This feature can be very useful when accessing artifacts from languages other than Groovy (see section 13.1 Dealing with Non-Groovy Artifacts to learn more about this kind of artifacts).

> AST injection is always enabled unless you disable it as explained in section 4.7.2 Disable AST Injection.

Additionally to each artifact type you will find a companion GriffonClass that is specialized for each type. These specialized classes can be used to discover metadata about a particular artifact. The following is a list of the companion GriffonClass for each of the basic artifacts found in core

- Model -> griffon.core.GriffonModelClass
- View -> griffon.core.GriffonViewClass
- Controller -> griffon.core.GriffonControllerClass
- Service -> griffon.core.GriffonServiceClass

Be aware that additional artifacts provided by plugins (such as Charts and Wizards) may provide their own interface and companion GriffonClass. These too will be available when querying the `ArtifactManager`.