ProcessingEnvironment
.@Deprecated public interface AnnotationProcessorEnvironment
When an annotation processing tool is invoked, it is given a set of type declarations on which to operate. These are refered to as the specified types. The type declarations said to be included in this invocation consist of the specified types and any types nested within them.
DeclarationFilter
provides a simple way to select just the items of interest
when a method returns a collection of declarations.
Modifier and Type | Method and Description |
---|---|
void |
addListener(AnnotationProcessorListener listener)
Deprecated.
Add a listener.
|
Collection<Declaration> |
getDeclarationsAnnotatedWith(AnnotationTypeDeclaration a)
Deprecated.
Returns the declarations annotated with the given annotation type.
|
Declarations |
getDeclarationUtils()
Deprecated.
Returns an implementation of some utility methods for
operating on declarations.
|
Filer |
getFiler()
Deprecated.
Returns the filer used to create new source, class, or auxiliary
files.
|
Messager |
getMessager()
Deprecated.
Returns the messager used to report errors, warnings, and other
notices.
|
Map<String,String> |
getOptions()
Deprecated.
Returns the options passed to the annotation processing tool.
|
PackageDeclaration |
getPackage(String name)
Deprecated.
Returns the declaration of a package given its fully qualified name.
|
Collection<TypeDeclaration> |
getSpecifiedTypeDeclarations()
Deprecated.
Returns the declarations of the types specified when the
annotation processing tool was invoked.
|
TypeDeclaration |
getTypeDeclaration(String name)
Deprecated.
Returns the declaration of a type given its fully qualified name.
|
Collection<TypeDeclaration> |
getTypeDeclarations()
Deprecated.
A convenience method that returns the declarations of the types
included
in this invocation of the annotation processing tool.
|
Types |
getTypeUtils()
Deprecated.
Returns an implementation of some utility methods for
operating on types.
|
void |
removeListener(AnnotationProcessorListener listener)
Deprecated.
Remove a listener.
|
Map<String,String> getOptions()
Options beginning with "-A" are processor-specific. Such options are unrecognized by the tool, but intended to be used by some annotation processor.
Messager getMessager()
Filer getFiler()
Collection<TypeDeclaration> getSpecifiedTypeDeclarations()
PackageDeclaration getPackage(String name)
name
- fully qualified package name, or "" for the unnamed packageTypeDeclaration getTypeDeclaration(String name)
name
- fully qualified type nameCollection<TypeDeclaration> getTypeDeclarations()
Collection<Declaration> getDeclarationsAnnotatedWith(AnnotationTypeDeclaration a)
a
- annotation type being requestedDeclarations getDeclarationUtils()
Types getTypeUtils()
void addListener(AnnotationProcessorListener listener)
listener
- The listener to add.NullPointerException
- if the listener is nullvoid removeListener(AnnotationProcessorListener listener)
listener
- The listener to remove.NullPointerException
- if the listener is null
Copyright © 2004, 2017, Oracle and/or its affiliates. All rights reserved.