Package org.eclipse.jdt.apt.core.env
Interface EclipseAnnotationProcessorEnvironment
-
- All Superinterfaces:
AnnotationProcessorEnvironment
public interface EclipseAnnotationProcessorEnvironment extends AnnotationProcessorEnvironment
Extended the APTAnnotationProcessorEnvironmentto expose extra API.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddTypeDependency(String fullyQualifiedTypeName)Add a type dependency on the type namedfullyQualifiedTypeNameCompilationUnitgetAST()Return the AST of the file currently being processed.IJavaProjectgetJavaProject()EclipseMessagergetMessager()Returns the messager used to report errors, warnings, and other notices.PhasegetPhase()Indicate whether the processor is being called during a build or during editing (that is, during reconcile).-
Methods inherited from interface com.sun.mirror.apt.AnnotationProcessorEnvironment
addListener, getDeclarationsAnnotatedWith, getDeclarationUtils, getFiler, getOptions, getPackage, getSpecifiedTypeDeclarations, getTypeDeclaration, getTypeDeclarations, getTypeUtils, removeListener
-
-
-
-
Method Detail
-
getAST
CompilationUnit getAST()
Return the AST of the file currently being processed.- Returns:
- the root of the fully flushed out DOM/AST of the file that is currently being processed.
This AST will contain binding information.
Return
nullfor if called by a batch processor.
-
getMessager
EclipseMessager getMessager()
Description copied from interface:AnnotationProcessorEnvironmentReturns the messager used to report errors, warnings, and other notices.- Specified by:
getMessagerin interfaceAnnotationProcessorEnvironment- Returns:
- the messager
-
getPhase
Phase getPhase()
Indicate whether the processor is being called during a build or during editing (that is, during reconcile).Note that processors that behave differently depending on phase may cause inconsistent results, such as problems showing up in the Problems view but not in the editor window. If the goal is to improve edit-time performance by skipping processing during reconcile, it is recommended to use the
PROCESSING_IN_EDITOR_DISABLEDoption instead.- Returns:
- the current processing phase: either
Phase.RECONCILEorPhase.BUILD
-
getJavaProject
IJavaProject getJavaProject()
- Returns:
- the java project associated with the current processing phase
-
addTypeDependency
void addTypeDependency(String fullyQualifiedTypeName)
Add a type dependency on the type namedfullyQualifiedTypeName- Parameters:
fullyQualifiedTypeName- the fully qualified (dot-separated) name of a type.- Throws:
IllegalArgumentException- iffullyQualifiedTypeNamecannot be resolved to a type.
-
-