@CompileStatic @GroovyASTTransformation(phase: CompilePhase.SEMANTIC_ANALYSIS) class ServiceTransformation extends AbstractTraitApplyingGormASTTransformation implements CompilationUnitAware, ASTTransformation
Makes a class implement the Service trait and generates the necessary service loader META-INF/services file.
| Modifiers | Name | Description |
|---|---|---|
static java.lang.String |
NO_IMPLEMENTATIONS_MESSAGE |
| Properties inherited from class | Properties |
|---|---|
class AbstractGormASTTransformation |
compilationUnit |
| Constructor and description |
|---|
ServiceTransformation() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
protected java.lang.Iterable<ServiceImplementer> |
findServiceImplementors(AnnotationNode annotationNode) |
|
protected void |
generateServiceDescriptor(SourceUnit sourceUnit, ClassNode classNode) |
|
protected ClassNode |
getAnnotationType() |
|
protected java.lang.Object |
getAppliedMarker() |
|
protected java.lang.Class |
getTraitClass() |
<T> |
protected java.lang.Iterable<T> |
load(java.lang.Class<T> type) |
|
protected void |
loadAnnotationDefined(AnnotationNode annotationNode, java.lang.String member, java.util.List finalList, java.lang.Class type) |
|
int |
priority() |
|
boolean |
shouldWeave(AnnotationNode annotationNode, ClassNode classNode) |
|
void |
visitAfterTraitApplied(SourceUnit sourceUnit, AnnotationNode annotationNode, ClassNode classNode) |
| Methods inherited from class | Name |
|---|---|
class AbstractTraitApplyingGormASTTransformation |
getTraitClass, shouldWeave, visit, visit, visitAfterTraitApplied, weaveTrait, weaveTraitWithGenerics |
class AbstractGormASTTransformation |
getAnnotationType, getAppliedMarker, getOrder, isValidAnnotation, priority, visit, visit |