|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.tools.javac.main.JavaCompiler
com.sun.tools.apt.main.JavaCompiler
public class JavaCompiler
This is NOT part of any API supported by Sun Microsystems. 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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.sun.tools.javac.main.JavaCompiler |
---|
JavaCompiler.CompilePolicy, JavaCompiler.CompileState, JavaCompiler.CompileStates, JavaCompiler.ImplicitSourcePolicy |
Field Summary | |
---|---|
(package private) java.util.Set<java.io.File> |
aggregateGenFiles
|
(package private) Apt |
apt
The annotation framework |
(package private) Bark |
bark
The bark to be used for error reporting. |
boolean |
classesAsDecls
Are class files being treated as declarations |
boolean |
classOutput
Emit class files. |
protected static Context.Key<JavaCompiler> |
compilerKey
The context key for the compiler. |
(package private) java.util.Set<java.lang.String> |
genClassFileNames
|
(package private) java.util.Set<java.lang.String> |
genSourceFileNames
|
private boolean |
hasBeenUsed
Track when the JavaCompiler has been used to compile something. |
(package private) Log |
log
The log to be used for error reporting. |
boolean |
nocompile
Compilation should not be done after annotation processing. |
boolean |
print
The internal printing annotation processor should be used. |
Fields inherited from class com.sun.tools.javac.main.JavaCompiler |
---|
annotate, annotationProcessingOccurred, attr, attrParseOnly, chk, compilePolicy, completionFailureName, context, delegateCompiler, devVerbose, elapsed_msec, encoding, enter, explicitAnnotationProcessingRequested, fileManager, flow, gen, genEndPos, implicitSourceFilesRead, implicitSourcePolicy, inputFiles, keepComments, lineDebugInfo, lower, make, names, parserFactory, printFlat, processPcks, reader, source, sourceOutput, stubOutput, syms, taskListener, todo, transStaging, transTypes, types, verbose, verboseCompilePolicy, writer |
Constructor Summary | |
---|---|
JavaCompiler(Context context)
Construct a new compiler from a shared context. |
Method Summary | |
---|---|
List<Symbol.ClassSymbol> |
compile(List<java.lang.String> filenames,
java.util.Map<java.lang.String,java.lang.String> origOptions,
java.lang.ClassLoader aptCL,
AnnotationProcessorFactory providedFactory,
java.util.Set<java.lang.Class<? extends AnnotationProcessorFactory>> productiveFactories,
java.util.Set<java.io.File> aggregateGenFiles)
Main method: compile a list of files, return all compiled classes |
java.util.Set<java.io.File> |
getAggregateGenFiles()
|
java.util.Set<java.lang.String> |
getClassFileNames()
List of names of generated class files. |
java.util.Set<java.lang.String> |
getSourceFileNames()
|
static JavaCompiler |
instance(Context context)
Get the JavaCompiler instance for this context. |
protected boolean |
keepComments()
|
protected JCTree.JCCompilationUnit |
parse(JavaFileObject filename,
java.lang.CharSequence content)
Parse contents of input stream. |
private static Context |
preRegister(Context context)
|
java.lang.CharSequence |
readSource(JavaFileObject filename)
Try to open input stream with given name. |
Methods inherited from class com.sun.tools.javac.main.JavaCompiler |
---|
attribute, attribute, close, close, compile, compile, complete, desugar, desugar, enableLogging, enterTrees, errorCount, flow, flow, flow, fullVersion, generate, generate, initProcessAnnotations, initRound, parse, parse, parseErrors, parseFiles, printCount, printVerbose, processAnnotations, processAnnotations, reportDeferredDiagnostics, resolveIdent, stopIfError, stopIfError, version, warningCount |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final Context.Key<JavaCompiler> compilerKey
java.util.Set<java.lang.String> genSourceFileNames
java.util.Set<java.lang.String> genClassFileNames
java.util.Set<java.io.File> aggregateGenFiles
Bark bark
Log log
Apt apt
public boolean classOutput
public boolean print
public boolean nocompile
public boolean classesAsDecls
private boolean hasBeenUsed
Constructor Detail |
---|
public JavaCompiler(Context context)
Method Detail |
---|
public static JavaCompiler instance(Context context)
public java.util.Set<java.lang.String> getSourceFileNames()
public java.util.Set<java.lang.String> getClassFileNames()
public java.util.Set<java.io.File> getAggregateGenFiles()
private static Context preRegister(Context context)
public java.lang.CharSequence readSource(JavaFileObject filename)
readSource
in class JavaCompiler
filename
- The file name of the input stream to be opened.protected JCTree.JCCompilationUnit parse(JavaFileObject filename, java.lang.CharSequence content)
parse
in class JavaCompiler
filename
- The name of the file from which input stream comes.input
- The input stream to be parsed.protected boolean keepComments()
keepComments
in class JavaCompiler
public List<Symbol.ClassSymbol> compile(List<java.lang.String> filenames, java.util.Map<java.lang.String,java.lang.String> origOptions, java.lang.ClassLoader aptCL, AnnotationProcessorFactory providedFactory, java.util.Set<java.lang.Class<? extends AnnotationProcessorFactory>> productiveFactories, java.util.Set<java.io.File> aggregateGenFiles) throws java.lang.Throwable
filenames
- The names of all files to be compiled.
java.lang.Throwable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |