Top Description Constructors Methods
org.eclipse.xtend.lib.macro

public abstract Class AbstractClassProcessor

extends Object
implements RegisterGlobalsParticipant<ClassDeclaration>, TransformationParticipant<MutableClassDeclaration>, CodeGenerationParticipant<ClassDeclaration>, ValidationParticipant<ClassDeclaration>
Class Inheritance
All Implemented Interfaces
org.eclipse.xtend.lib.macro.ValidationParticipant, org.eclipse.xtend.lib.macro.CodeGenerationParticipant, org.eclipse.xtend.lib.macro.TransformationParticipant, org.eclipse.xtend.lib.macro.RegisterGlobalsParticipant
Annotations
@Beta
Imports
java.util.List, org.eclipse.xtend.lib.macro.declaration.ClassDeclaration, .MutableClassDeclaration, org.eclipse.xtext.xbase.lib.Extension, com.google.common.annotations.Beta

A convenient base class to process active annotations for classes.
Author
Sven Efftinge

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
doGenerateCode(List<? extends ClassDeclaration> annotatedSourceElements, CodeGenerationContext context)

Implements org.eclipse.xtend.lib.macro.CodeGenerationParticipant.doGenerateCode.

Invoked by the compiler during the code generation phase.

public void
doGenerateCode(ClassDeclaration
a source element annotated with the annotation this processor is responsible for.
annotatedClass
,
CodeGenerationContext context)

Called during code generation.

public void
doRegisterGlobals(List<? extends ClassDeclaration> annotatedClasses, RegisterGlobalsContext context)

Implements org.eclipse.xtend.lib.macro.RegisterGlobalsParticipant.doRegisterGlobals.

Called by the compiler during register-globals phase.

public void
doRegisterGlobals(ClassDeclaration
a source element annotated with the annotation this processor is responsible for.
annotatedClass
,
RegisterGlobalsContext context)

Called during global symbol collecting.

public void
public void
doTransform(MutableClassDeclaration
a mutable class representation annotated with the annotation this processor is responsible for.
annotatedClass
,
TransformationContext context)

public void
doValidate(List<? extends ClassDeclaration> annotatedClasses, ValidationContext context)

Implements org.eclipse.xtend.lib.macro.ValidationParticipant.doValidate.

Invoked by the validator

public void
doValidate(ClassDeclaration
the generated class that should be validated
annotatedClass
,
ValidationContext context)

Invoked by the validator

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

AbstractClassProcessorback to summary
public AbstractClassProcessor()

Method Detail

doGenerateCodeback to summary
public void doGenerateCode(List<? extends ClassDeclaration> annotatedSourceElements, CodeGenerationContext context)

Implements org.eclipse.xtend.lib.macro.CodeGenerationParticipant.doGenerateCode.

Doc from org.eclipse.xtend.lib.macro.CodeGenerationParticipant.doGenerateCode.

Invoked by the compiler during the code generation phase.

doGenerateCodeback to summary
public void doGenerateCode(ClassDeclaration annotatedClass, CodeGenerationContext context)

Called during code generation.

Parameters
annotatedClass:ClassDeclaration

a source element annotated with the annotation this processor is responsible for.

See Also
CodeGenerationParticipant#doGenerateCode(List, CodeGenerationContext)
doRegisterGlobalsback to summary
public void doRegisterGlobals(List<? extends ClassDeclaration> annotatedClasses, RegisterGlobalsContext context)

Implements org.eclipse.xtend.lib.macro.RegisterGlobalsParticipant.doRegisterGlobals.

Doc from org.eclipse.xtend.lib.macro.RegisterGlobalsParticipant.doRegisterGlobals.

Called by the compiler during register-globals phase.

doRegisterGlobalsback to summary
public void doRegisterGlobals(ClassDeclaration annotatedClass, RegisterGlobalsContext context)

Called during global symbol collecting.

Parameters
annotatedClass:ClassDeclaration

a source element annotated with the annotation this processor is responsible for.

doTransformback to summary
public void doTransform(List<? extends MutableClassDeclaration> annotatedClasses, TransformationContext context)

Implements org.eclipse.xtend.lib.macro.TransformationParticipant.doTransform.

Doc from org.eclipse.xtend.lib.macro.TransformationParticipant.doTransform.

Invoked by the compiler

doTransformback to summary
public void doTransform(MutableClassDeclaration annotatedClass, TransformationContext context)
Parameters
annotatedClass:MutableClassDeclaration

a mutable class representation annotated with the annotation this processor is responsible for.

doValidateback to summary
public void doValidate(List<? extends ClassDeclaration> annotatedClasses, ValidationContext context)

Implements org.eclipse.xtend.lib.macro.ValidationParticipant.doValidate.

Doc from org.eclipse.xtend.lib.macro.ValidationParticipant.doValidate.

Invoked by the validator

doValidateback to summary
public void doValidate(ClassDeclaration annotatedClass, ValidationContext context)

Invoked by the validator

Parameters
annotatedClass:ClassDeclaration

the generated class that should be validated

Since
2.7
See Also
doValidate(List, ValidationContext)