diff --git a/src/en/guide/plugins/addingMethodsAtCompileTime.adoc b/src/en/guide/plugins/addingMethodsAtCompileTime.adoc index 10a17a7f9b5..289c48144d0 100644 --- a/src/en/guide/plugins/addingMethodsAtCompileTime.adoc +++ b/src/en/guide/plugins/addingMethodsAtCompileTime.adoc @@ -25,7 +25,7 @@ class ControllerTraitInjector implements TraitInjector { @Override Class getTrait() { - DateTrait + SomeTrait } @Override @@ -35,7 +35,7 @@ class ControllerTraitInjector implements TraitInjector { } ---- -The above `TraitInjector` will add the `DateTrait` to all controllers. The `getArtefactTypes` method defines the types of artefacts that the trait should be applied to. +The above `TraitInjector` will add the `SomeTrait` to all controllers. The `getArtefactTypes` method defines the types of artefacts that the trait should be applied to. The framework discovers trait injectors by way of a `META-INF/grails.factories` descriptor that is in the .jar file. This descriptor is automatically generated. The descriptor generated for the code shown above would look like this: