@Beta public abstract class AbstractMethodProcessor extends java.lang.Object implements RegisterGlobalsParticipant<MethodDeclaration>, TransformationParticipant<MutableMethodDeclaration>, CodeGenerationParticipant<MethodDeclaration>, ValidationParticipant<MethodDeclaration>
Constructor and Description |
---|
AbstractMethodProcessor() |
Modifier and Type | Method and Description |
---|---|
void |
doGenerateCode(java.util.List<? extends MethodDeclaration> annotatedMethods,
CodeGenerationContext context)
Invoked by the compiler during the code generation phase.
|
void |
doGenerateCode(MethodDeclaration annotatedMethod,
CodeGenerationContext context) |
void |
doRegisterGlobals(java.util.List<? extends MethodDeclaration> annotatedMethods,
RegisterGlobalsContext context)
Called by the compiler during register-globals phase.
|
void |
doRegisterGlobals(MethodDeclaration annotatedMethod,
RegisterGlobalsContext context) |
void |
doTransform(java.util.List<? extends MutableMethodDeclaration> annotatedMethods,
TransformationContext context)
Invoked by the compiler
|
void |
doTransform(MutableMethodDeclaration annotatedMethod,
TransformationContext context) |
void |
doValidate(java.util.List<? extends MethodDeclaration> annotatedMethods,
ValidationContext context)
Invoked by the validator
|
void |
doValidate(MethodDeclaration annotatedMethod,
ValidationContext context)
Invoked by the validator
|
public void doRegisterGlobals(java.util.List<? extends MethodDeclaration> annotatedMethods, RegisterGlobalsContext context)
RegisterGlobalsParticipant
doRegisterGlobals
in interface RegisterGlobalsParticipant<MethodDeclaration>
annotatedMethods
- the source elements from the currently processed compilation
unit which are annotated with active annotationcontext
- services to register new Java typesRegisterGlobalsContext
public void doRegisterGlobals(MethodDeclaration annotatedMethod, RegisterGlobalsContext context)
annotatedMethod
- a source method annotated with the annotation this processor is responsible for.context
- public void doTransform(java.util.List<? extends MutableMethodDeclaration> annotatedMethods, @Extension TransformationContext context)
TransformationParticipant
doTransform
in interface TransformationParticipant<MutableMethodDeclaration>
annotatedMethods
- the mutable java representation of the annotated elementscontext
- a TransformationContext
providing useful services.public void doTransform(MutableMethodDeclaration annotatedMethod, @Extension TransformationContext context)
annotatedMethod
- a mutable method representation annotated with the annotation this processor is responsible for.context
- public void doGenerateCode(java.util.List<? extends MethodDeclaration> annotatedMethods, @Extension CodeGenerationContext context)
CodeGenerationParticipant
doGenerateCode
in interface CodeGenerationParticipant<MethodDeclaration>
annotatedMethods
- the immutable source representation (i.e. the Xtend AST) of the annotated elementscontext
- a TransformationContext
providing useful services.public void doGenerateCode(MethodDeclaration annotatedMethod, @Extension CodeGenerationContext context)
annotatedMethod
- a source method annotated with the annotation this processor is responsible for.context
- public void doValidate(java.util.List<? extends MethodDeclaration> annotatedMethods, @Extension ValidationContext context)
ValidationParticipant
doValidate
in interface ValidationParticipant<MethodDeclaration>
annotatedMethods
- the java representation of the annotated elementscontext
- a ValidationContext
providing useful services.public void doValidate(MethodDeclaration annotatedMethod, ValidationContext context)
annotatedMethod
- that generated method that should be validatedcontext
- doValidate(MethodDeclaration, ValidationContext)