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

public abstract Class AbstractFieldProcessor

extends Object
implements RegisterGlobalsParticipant<FieldDeclaration>, TransformationParticipant<MutableFieldDeclaration>, CodeGenerationParticipant<FieldDeclaration>, ValidationParticipant<FieldDeclaration>
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.FieldDeclaration, .MutableFieldDeclaration, org.eclipse.xtext.xbase.lib.Extension, com.google.common.annotations.Beta

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

Constructor Summary

AccessConstructor and Description
public

Method Summary

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

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

Invoked by the compiler during the code generation phase.

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

Called during code generation.

public void
doRegisterGlobals(List<? extends FieldDeclaration> annotatedFields, RegisterGlobalsContext context)

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

Called by the compiler during register-globals phase.

public void
doRegisterGlobals(FieldDeclaration
a source field annotated with the annotation this processor is responsible for.
annotatedField
,
RegisterGlobalsContext context)

public void
public void
doTransform(MutableFieldDeclaration
a mutable field representation annotated with the annotation this processor is responsible for.
annotatedField
,
TransformationContext context)

public void
doValidate(List<? extends FieldDeclaration> annotatedFields, ValidationContext context)

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

Invoked by the validator

public void
doValidate(FieldDeclaration
the generated field that should be validated
annotatedField
,
ValidationContext context)

Invoked by the validator

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

AbstractFieldProcessorback to summary
public AbstractFieldProcessor()

Method Detail

doGenerateCodeback to summary
public void doGenerateCode(List<? extends FieldDeclaration> annotatedFields, 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(FieldDeclaration annotatedField, CodeGenerationContext context)

Called during code generation.

Parameters
annotatedField:FieldDeclaration

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 FieldDeclaration> annotatedFields, 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(FieldDeclaration annotatedField, RegisterGlobalsContext context)
Parameters
annotatedField:FieldDeclaration

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

doTransformback to summary
public void doTransform(List<? extends MutableFieldDeclaration> annotatedfields, 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(MutableFieldDeclaration annotatedField, TransformationContext context)
Parameters
annotatedField:MutableFieldDeclaration

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

doValidateback to summary
public void doValidate(List<? extends FieldDeclaration> annotatedFields, 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(FieldDeclaration annotatedField, ValidationContext context)

Invoked by the validator

Parameters
annotatedField:FieldDeclaration

the generated field that should be validated

Since
2.7
See Also
doValidate(List, ValidationContext)