@groovy.transform.CompileStatic @org.codehaus.groovy.transform.GroovyASTTransformation(phase: CompilePhase.SEMANTIC_ANALYSIS) class ServiceTransformation extends AbstractTraitApplyingGormASTTransformation implements groovy.transform.CompilationUnitAware, org.codehaus.groovy.transform.ASTTransformation
Makes a class implement the Service trait and generates the necessary service loader META-INF/services file.
Modifiers | Name | Description |
---|---|---|
private static java.lang.Object |
APPLIED_MARKER |
|
private static java.util.List<ServiceImplementer> |
DEFAULT_IMPLEMENTORS |
|
private static java.lang.Iterable<ServiceImplementer> |
LOADED_IMPLEMENTORS |
|
private static org.codehaus.groovy.ast.ClassNode |
MY_TYPE |
|
static java.lang.String |
NO_IMPLEMENTATIONS_MESSAGE |
Fields inherited from class | Fields |
---|---|
class AbstractGormASTTransformation |
compilationUnit |
Constructor and description |
---|
ServiceTransformation
() |
Type Params | Return Type | Name and description |
---|---|---|
|
private java.lang.Iterable<ServiceImplementer> |
addClassExpressionToImplementers(org.codehaus.groovy.ast.expr.Expression exp, java.util.List implementers, java.lang.Class type) |
|
protected java.lang.Iterable<ServiceImplementer> |
findServiceImplementors(org.codehaus.groovy.ast.AnnotationNode annotationNode) |
|
protected void |
generateServiceDescriptor(org.codehaus.groovy.control.SourceUnit sourceUnit, org.codehaus.groovy.ast.ClassNode classNode) |
|
protected org.codehaus.groovy.ast.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(org.codehaus.groovy.ast.AnnotationNode annotationNode, java.lang.String member, java.util.List finalList, java.lang.Class type) |
|
boolean |
shouldWeave(org.codehaus.groovy.ast.AnnotationNode annotationNode, org.codehaus.groovy.ast.ClassNode classNode) |
|
void |
visitAfterTraitApplied(org.codehaus.groovy.control.SourceUnit sourceUnit, org.codehaus.groovy.ast.AnnotationNode annotationNode, org.codehaus.groovy.ast.ClassNode classNode) |
Methods inherited from class | Name |
---|---|
class AbstractTraitApplyingGormASTTransformation |
getTraitClass, shouldWeave, visit, visit, visitAfterTraitApplied, weaveTrait, weaveTraitWithGenerics |
class AbstractGormASTTransformation |
getAnnotationType, getAppliedMarker, isValidAnnotation, visit, visit |