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