Module org.eclipse.xtend.lib.macro
Package org.eclipse.xtend.lib.macro
Class AbstractEnumerationTypeProcessor
java.lang.Object
org.eclipse.xtend.lib.macro.AbstractEnumerationTypeProcessor
- All Implemented Interfaces:
CodeGenerationParticipant<EnumerationTypeDeclaration>,RegisterGlobalsParticipant<EnumerationTypeDeclaration>,TransformationParticipant<MutableEnumerationTypeDeclaration>,ValidationParticipant<EnumerationTypeDeclaration>
@Beta
public abstract class AbstractEnumerationTypeProcessor
extends Object
implements RegisterGlobalsParticipant<EnumerationTypeDeclaration>, TransformationParticipant<MutableEnumerationTypeDeclaration>, CodeGenerationParticipant<EnumerationTypeDeclaration>, ValidationParticipant<EnumerationTypeDeclaration>
A convenient base class to process active annotations for enumeration types.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoGenerateCode(List<? extends EnumerationTypeDeclaration> annotatedSourceElements, CodeGenerationContext context) Invoked by the compiler during the code generation phase.voiddoGenerateCode(EnumerationTypeDeclaration annotatedEnumerationType, CodeGenerationContext context) Called during code generation.voiddoRegisterGlobals(List<? extends EnumerationTypeDeclaration> annotatedEnumerationTypes, RegisterGlobalsContext context) Called by the compiler during register-globals phase.voiddoRegisterGlobals(EnumerationTypeDeclaration annotatedEnumerationType, RegisterGlobalsContext context) Called during global symbol collecting.voiddoTransform(List<? extends MutableEnumerationTypeDeclaration> annotatedEnumerationTypes, TransformationContext context) Invoked by the compilervoiddoTransform(MutableEnumerationTypeDeclaration annotatedEnumerationType, TransformationContext context) voiddoValidate(List<? extends EnumerationTypeDeclaration> annotatedEnumerationTypes, ValidationContext context) Invoked by the validatorvoiddoValidate(EnumerationTypeDeclaration annotatedEnumerationType, ValidationContext context) Invoked by the validator
-
Constructor Details
-
AbstractEnumerationTypeProcessor
public AbstractEnumerationTypeProcessor()
-
-
Method Details
-
doRegisterGlobals
public void doRegisterGlobals(List<? extends EnumerationTypeDeclaration> annotatedEnumerationTypes, @Extension RegisterGlobalsContext context) Description copied from interface:RegisterGlobalsParticipantCalled by the compiler during register-globals phase.- Specified by:
doRegisterGlobalsin interfaceRegisterGlobalsParticipant<EnumerationTypeDeclaration>- Parameters:
annotatedEnumerationTypes- the source elements from the currently processed compilation unit which are annotated with active annotationcontext- services to register new Java types- See Also:
-
doRegisterGlobals
public void doRegisterGlobals(EnumerationTypeDeclaration annotatedEnumerationType, @Extension RegisterGlobalsContext context) Called during global symbol collecting.- Parameters:
annotatedEnumerationType- a source element annotated with the annotation this processor is responsible for.context-
-
doTransform
public void doTransform(List<? extends MutableEnumerationTypeDeclaration> annotatedEnumerationTypes, @Extension TransformationContext context) Description copied from interface:TransformationParticipantInvoked by the compiler- Specified by:
doTransformin interfaceTransformationParticipant<MutableEnumerationTypeDeclaration>- Parameters:
annotatedEnumerationTypes- the mutable java representation of the annotated elementscontext- aTransformationContextproviding useful services.
-
doTransform
public void doTransform(MutableEnumerationTypeDeclaration annotatedEnumerationType, @Extension TransformationContext context) - Parameters:
annotatedEnumerationType- a mutable enumeration type representation annotated with the annotation this processor is responsible for.context-
-
doGenerateCode
public void doGenerateCode(List<? extends EnumerationTypeDeclaration> annotatedSourceElements, @Extension CodeGenerationContext context) Description copied from interface:CodeGenerationParticipantInvoked by the compiler during the code generation phase.- Specified by:
doGenerateCodein interfaceCodeGenerationParticipant<EnumerationTypeDeclaration>- Parameters:
annotatedSourceElements- the immutable source representation (i.e. the Xtend AST) of the annotated elementscontext- aTransformationContextproviding useful services.
-
doGenerateCode
public void doGenerateCode(EnumerationTypeDeclaration annotatedEnumerationType, @Extension CodeGenerationContext context) Called during code generation.- Parameters:
annotatedEnumerationType- a source element annotated with the annotation this processor is responsible for.context-- See Also:
-
doValidate
public void doValidate(List<? extends EnumerationTypeDeclaration> annotatedEnumerationTypes, @Extension ValidationContext context) Description copied from interface:ValidationParticipantInvoked by the validator- Specified by:
doValidatein interfaceValidationParticipant<EnumerationTypeDeclaration>- Parameters:
annotatedEnumerationTypes- the java representation of the annotated elementscontext- aValidationContextproviding useful services.
-
doValidate
public void doValidate(EnumerationTypeDeclaration annotatedEnumerationType, @Extension ValidationContext context) Invoked by the validator- Parameters:
annotatedEnumerationType- the generated enumeration type that should be validatedcontext-- Since:
- 2.7
- See Also:
-