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

public abstract Class AbstractMethodProcessor

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

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

Constructor Summary

AccessConstructor and Description
public

Method Summary

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

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

Invoked by the compiler during the code generation phase.

public void
doGenerateCode(MethodDeclaration
a source method annotated with the annotation this processor is responsible for.
annotatedMethod
,
CodeGenerationContext context)

public void
doRegisterGlobals(List<? extends MethodDeclaration> annotatedMethods, RegisterGlobalsContext context)

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

Called by the compiler during register-globals phase.

public void
doRegisterGlobals(MethodDeclaration
a source method annotated with the annotation this processor is responsible for.
annotatedMethod
,
RegisterGlobalsContext context)

public void
public void
doTransform(MutableMethodDeclaration
a mutable method representation annotated with the annotation this processor is responsible for.
annotatedMethod
,
TransformationContext context)

public void
doValidate(List<? extends MethodDeclaration> annotatedMethods, ValidationContext context)

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

Invoked by the validator

public void
doValidate(MethodDeclaration
that generated method that should be validated
annotatedMethod
,
ValidationContext context)

Invoked by the validator

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

AbstractMethodProcessorback to summary
public AbstractMethodProcessor()

Method Detail

doGenerateCodeback to summary
public void doGenerateCode(List<? extends MethodDeclaration> annotatedMethods, 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(MethodDeclaration annotatedMethod, CodeGenerationContext context)
Parameters
annotatedMethod:MethodDeclaration

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

doRegisterGlobalsback to summary
public void doRegisterGlobals(List<? extends MethodDeclaration> annotatedMethods, 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(MethodDeclaration annotatedMethod, RegisterGlobalsContext context)
Parameters
annotatedMethod:MethodDeclaration

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

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

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

doValidateback to summary
public void doValidate(List<? extends MethodDeclaration> annotatedMethods, 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(MethodDeclaration annotatedMethod, ValidationContext context)

Invoked by the validator

Parameters
annotatedMethod:MethodDeclaration

that generated method that should be validated

Since
2.7
See Also
doValidate(MethodDeclaration, ValidationContext)