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