public class JavacProcessingEnvironment extends Object implements ProcessingEnvironment, Closeable
This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
Modifier and Type | Class and Description |
---|---|
static class |
JavacProcessingEnvironment.ComputeAnnotationSet
Computes the set of annotations on the symbol in question.
|
Modifier | Constructor and Description |
---|---|
protected |
JavacProcessingEnvironment(Context context) |
Modifier and Type | Method and Description |
---|---|
boolean |
atLeastOneProcessor() |
void |
close()
Free resources related to annotation processing.
|
JavaCompiler |
doProcessing(Context context,
List<JCTree.JCCompilationUnit> roots,
List<Symbol.ClassSymbol> classSymbols,
Iterable<? extends Symbol.PackageSymbol> pckSymbols,
Log.DeferredDiagnosticHandler deferredDiagnosticHandler) |
Context |
getContext()
For internal use only.
|
JavacElements |
getElementUtils()
Returns an implementation of some utility methods for
operating on elements
|
Filer |
getFiler()
Returns the filer used to create new source, class, or auxiliary
files.
|
Locale |
getLocale()
Returns the current locale or
null if no locale is in
effect. |
Messager |
getMessager()
Returns the messager used to report errors, warnings, and other
notices.
|
Map<String,String> |
getOptions()
Command line options suitable for presenting to annotation
processors.
|
ClassLoader |
getProcessorClassLoader()
For internal use only.
|
SourceVersion |
getSourceVersion()
|
Set<Symbol.PackageSymbol> |
getSpecifiedPackages() |
JavacTypes |
getTypeUtils()
Returns an implementation of some utility methods for
operating on types.
|
static JavacProcessingEnvironment |
instance(Context context)
Get the JavacProcessingEnvironment instance for this context.
|
static boolean |
isValidImportString(String s)
Return true if the argument string is a valid import-style
string specifying claimed annotations; return false otherwise.
|
static boolean |
isValidOptionName(String optionName) |
void |
setProcessors(Iterable<? extends Processor> processors) |
String |
toString() |
static Pattern |
validImportStringToPattern(String s) |
public static final Pattern noMatches
protected JavacProcessingEnvironment(Context context)
public static JavacProcessingEnvironment instance(Context context)
public boolean atLeastOneProcessor()
public JavaCompiler doProcessing(Context context, List<JCTree.JCCompilationUnit> roots, List<Symbol.ClassSymbol> classSymbols, Iterable<? extends Symbol.PackageSymbol> pckSymbols, Log.DeferredDiagnosticHandler deferredDiagnosticHandler)
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public Map<String,String> getOptions()
getOptions
in interface ProcessingEnvironment
public Messager getMessager()
ProcessingEnvironment
getMessager
in interface ProcessingEnvironment
public Filer getFiler()
ProcessingEnvironment
getFiler
in interface ProcessingEnvironment
public JavacElements getElementUtils()
ProcessingEnvironment
getElementUtils
in interface ProcessingEnvironment
public JavacTypes getTypeUtils()
ProcessingEnvironment
getTypeUtils
in interface ProcessingEnvironment
public SourceVersion getSourceVersion()
ProcessingEnvironment
getSourceVersion
in interface ProcessingEnvironment
Processor.getSupportedSourceVersion()
public Locale getLocale()
ProcessingEnvironment
null
if no locale is in
effect. The locale can be be used to provide localized
messages.getLocale
in interface ProcessingEnvironment
null
if no locale is in
effectpublic Set<Symbol.PackageSymbol> getSpecifiedPackages()
public static boolean isValidImportString(String s)
public Context getContext()
public ClassLoader getProcessorClassLoader()
public static boolean isValidOptionName(String optionName)
Copyright © 2016. All rights reserved.