|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectorg.eclipse.jdt.internal.compiler.Compiler
public class Compiler
| 从接口 org.eclipse.jdt.internal.compiler.problem.ProblemSeverities 继承的字段 |
|---|
Abort, AbortCompilation, AbortCompilationUnit, AbortMethod, AbortType, Error, Fatal, Ignore, Optional, SecondaryError, Warning |
| 构造方法摘要 | |
|---|---|
Compiler(INameEnvironment environment,
IErrorHandlingPolicy policy,
CompilerOptions options,
ICompilerRequestor requestor,
IProblemFactory problemFactory)
Answer a new compiler using the given name environment and compiler options. |
|
Compiler(INameEnvironment environment,
IErrorHandlingPolicy policy,
CompilerOptions options,
ICompilerRequestor requestor,
IProblemFactory problemFactory,
PrintWriter out)
已过时。 |
|
Compiler(INameEnvironment environment,
IErrorHandlingPolicy policy,
CompilerOptions options,
ICompilerRequestor requestor,
IProblemFactory problemFactory,
PrintWriter out,
CompilationProgress progress)
|
|
Compiler(INameEnvironment environment,
IErrorHandlingPolicy policy,
Map settings,
ICompilerRequestor requestor,
IProblemFactory problemFactory)
已过时。 this constructor is kept to preserve 3.1 and 3.2M4 compatibility |
|
Compiler(INameEnvironment environment,
IErrorHandlingPolicy policy,
Map settings,
ICompilerRequestor requestor,
IProblemFactory problemFactory,
boolean parseLiteralExpressionsAsConstants)
已过时。 this constructor is kept to preserve 3.1 and 3.2M4 compatibility |
|
| 方法摘要 | |
|---|---|
void |
accept(IBinaryType binaryType,
PackageBinding packageBinding,
AccessRestriction accessRestriction)
Add an additional binary type |
void |
accept(ICompilationUnit sourceUnit,
AccessRestriction accessRestriction)
Add an additional compilation unit into the loop -> build compilation unit declarations, their bindings and record their results. |
void |
accept(ISourceType[] sourceTypes,
PackageBinding packageBinding,
AccessRestriction accessRestriction)
Add additional source types |
protected void |
addCompilationUnit(ICompilationUnit sourceUnit,
CompilationUnitDeclaration parsedUnit)
|
protected void |
beginToCompile(ICompilationUnit[] sourceUnits)
Add the initial set of compilation units into the loop -> build compilation unit declarations, their bindings and record their results. |
void |
compile(ICompilationUnit[] sourceUnits)
General API -> compile each of supplied files -> recompile any required types for which we have an incomplete principle structure |
CompilationUnitDeclaration |
getUnitToProcess(int next)
|
protected void |
handleInternalException(AbortCompilation abortException,
CompilationUnitDeclaration unit)
|
protected void |
handleInternalException(Throwable internalException,
CompilationUnitDeclaration unit,
CompilationResult result)
|
void |
initializeParser()
|
protected void |
internalBeginToCompile(ICompilationUnit[] sourceUnits,
int maxUnits)
Add the initial set of compilation units into the loop -> build compilation unit declarations, their bindings and record their results. |
void |
process(CompilationUnitDeclaration unit,
int i)
Process a compilation unit already parsed and build. |
protected void |
processAnnotations()
|
protected void |
reportProgress(String taskDecription)
Checks whether the compilation has been canceled and reports the given progress to the compiler progress. |
protected void |
reportWorked(int workIncrement,
int currentUnitIndex)
Checks whether the compilation has been canceled and reports the given work increment to the compiler progress. |
void |
reset()
|
CompilationUnitDeclaration |
resolve(CompilationUnitDeclaration unit,
ICompilationUnit sourceUnit,
boolean verifyMethods,
boolean analyzeCode,
boolean generateCode)
Internal API used to resolve a given compilation unit. |
CompilationUnitDeclaration |
resolve(ICompilationUnit sourceUnit,
boolean verifyMethods,
boolean analyzeCode,
boolean generateCode)
Internal API used to resolve a given compilation unit. |
void |
setBinaryTypes(ReferenceBinding[] binaryTypes)
|
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 字段详细信息 |
|---|
public Parser parser
public ICompilerRequestor requestor
public CompilerOptions options
public ProblemReporter problemReporter
protected PrintWriter out
public CompilerStats stats
public CompilationProgress progress
public int remainingIterations
public CompilationUnitDeclaration[] unitsToProcess
public int totalUnits
public LookupEnvironment lookupEnvironment
public static boolean DEBUG
public int parseThreshold
public AbstractAnnotationProcessorManager annotationProcessorManager
public int annotationProcessorStartIndex
public ReferenceBinding[] referenceBindings
public boolean useSingleThread
public static IDebugRequestor DebugRequestor
| 构造方法详细信息 |
|---|
public Compiler(INameEnvironment environment,
IErrorHandlingPolicy policy,
Map settings,
ICompilerRequestor requestor,
IProblemFactory problemFactory)
environment - org.eclipse.jdt.internal.compiler.api.env.INameEnvironment
Environment used by the compiler in order to resolve type and package
names. The name environment implements the actual connection of the compiler
to the outside world (e.g. in batch mode the name environment is performing
pure file accesses, reuse previous build state or connection to repositories).
Note: the name environment is responsible for implementing the actual classpath
rules.policy - org.eclipse.jdt.internal.compiler.api.problem.IErrorHandlingPolicy
Configurable part for problem handling, allowing the compiler client to
specify the rules for handling problems (stop on first error or accumulate
them all) and at the same time perform some actions such as opening a dialog
in UI when compiling interactively.settings - java.util.Map
The settings that control the compiler behavior.requestor - org.eclipse.jdt.internal.compiler.api.ICompilerRequestor
Component which will receive and persist all compilation results and is intended
to consume them as they are produced. Typically, in a batch compiler, it is
responsible for writing out the actual .class files to the file system.problemFactory - org.eclipse.jdt.internal.compiler.api.problem.IProblemFactory
Factory used inside the compiler to create problem descriptors. It allows the
compiler client to supply its own representation of compilation problems in
order to avoid object conversions. Note that the factory is not supposed
to accumulate the created problems, the compiler will gather them all and hand
them back as part of the compilation unit result.DefaultErrorHandlingPolicies,
CompilationResult
public Compiler(INameEnvironment environment,
IErrorHandlingPolicy policy,
Map settings,
ICompilerRequestor requestor,
IProblemFactory problemFactory,
boolean parseLiteralExpressionsAsConstants)
environment - org.eclipse.jdt.internal.compiler.api.env.INameEnvironment
Environment used by the compiler in order to resolve type and package
names. The name environment implements the actual connection of the compiler
to the outside world (e.g. in batch mode the name environment is performing
pure file accesses, reuse previous build state or connection to repositories).
Note: the name environment is responsible for implementing the actual classpath
rules.policy - org.eclipse.jdt.internal.compiler.api.problem.IErrorHandlingPolicy
Configurable part for problem handling, allowing the compiler client to
specify the rules for handling problems (stop on first error or accumulate
them all) and at the same time perform some actions such as opening a dialog
in UI when compiling interactively.settings - java.util.Map
The settings that control the compiler behavior.requestor - org.eclipse.jdt.internal.compiler.api.ICompilerRequestor
Component which will receive and persist all compilation results and is intended
to consume them as they are produced. Typically, in a batch compiler, it is
responsible for writing out the actual .class files to the file system.problemFactory - org.eclipse.jdt.internal.compiler.api.problem.IProblemFactory
Factory used inside the compiler to create problem descriptors. It allows the
compiler client to supply its own representation of compilation problems in
order to avoid object conversions. Note that the factory is not supposed
to accumulate the created problems, the compiler will gather them all and hand
them back as part of the compilation unit result.parseLiteralExpressionsAsConstants - boolean
This parameter is used to optimize the literals or leave them as they are in the source.
If you put true, "Hello" + " world" will be converted to "Hello world".DefaultErrorHandlingPolicies,
CompilationResult
public Compiler(INameEnvironment environment,
IErrorHandlingPolicy policy,
CompilerOptions options,
ICompilerRequestor requestor,
IProblemFactory problemFactory)
environment - org.eclipse.jdt.internal.compiler.api.env.INameEnvironment
Environment used by the compiler in order to resolve type and package
names. The name environment implements the actual connection of the compiler
to the outside world (e.g. in batch mode the name environment is performing
pure file accesses, reuse previous build state or connection to repositories).
Note: the name environment is responsible for implementing the actual classpath
rules.policy - org.eclipse.jdt.internal.compiler.api.problem.IErrorHandlingPolicy
Configurable part for problem handling, allowing the compiler client to
specify the rules for handling problems (stop on first error or accumulate
them all) and at the same time perform some actions such as opening a dialog
in UI when compiling interactively.options - org.eclipse.jdt.internal.compiler.impl.CompilerOptions
The options that control the compiler behavior.requestor - org.eclipse.jdt.internal.compiler.api.ICompilerRequestor
Component which will receive and persist all compilation results and is intended
to consume them as they are produced. Typically, in a batch compiler, it is
responsible for writing out the actual .class files to the file system.problemFactory - org.eclipse.jdt.internal.compiler.api.problem.IProblemFactory
Factory used inside the compiler to create problem descriptors. It allows the
compiler client to supply its own representation of compilation problems in
order to avoid object conversions. Note that the factory is not supposed
to accumulate the created problems, the compiler will gather them all and hand
them back as part of the compilation unit result.DefaultErrorHandlingPolicies,
CompilationResult
public Compiler(INameEnvironment environment,
IErrorHandlingPolicy policy,
CompilerOptions options,
ICompilerRequestor requestor,
IProblemFactory problemFactory,
PrintWriter out)
environment - org.eclipse.jdt.internal.compiler.api.env.INameEnvironment
Environment used by the compiler in order to resolve type and package
names. The name environment implements the actual connection of the compiler
to the outside world (e.g. in batch mode the name environment is performing
pure file accesses, reuse previous build state or connection to repositories).
Note: the name environment is responsible for implementing the actual classpath
rules.policy - org.eclipse.jdt.internal.compiler.api.problem.IErrorHandlingPolicy
Configurable part for problem handling, allowing the compiler client to
specify the rules for handling problems (stop on first error or accumulate
them all) and at the same time perform some actions such as opening a dialog
in UI when compiling interactively.options - org.eclipse.jdt.internal.compiler.impl.CompilerOptions
The options that control the compiler behavior.requestor - org.eclipse.jdt.internal.compiler.api.ICompilerRequestor
Component which will receive and persist all compilation results and is intended
to consume them as they are produced. Typically, in a batch compiler, it is
responsible for writing out the actual .class files to the file system.problemFactory - org.eclipse.jdt.internal.compiler.api.problem.IProblemFactory
Factory used inside the compiler to create problem descriptors. It allows the
compiler client to supply its own representation of compilation problems in
order to avoid object conversions. Note that the factory is not supposed
to accumulate the created problems, the compiler will gather them all and hand
them back as part of the compilation unit result.DefaultErrorHandlingPolicies,
CompilationResult
public Compiler(INameEnvironment environment,
IErrorHandlingPolicy policy,
CompilerOptions options,
ICompilerRequestor requestor,
IProblemFactory problemFactory,
PrintWriter out,
CompilationProgress progress)
| 方法详细信息 |
|---|
public void accept(IBinaryType binaryType,
PackageBinding packageBinding,
AccessRestriction accessRestriction)
ITypeRequestor 中的 accept
public void accept(ICompilationUnit sourceUnit,
AccessRestriction accessRestriction)
ITypeRequestor 中的 accept
public void accept(ISourceType[] sourceTypes,
PackageBinding packageBinding,
AccessRestriction accessRestriction)
ITypeRequestor 中的 accept
protected void addCompilationUnit(ICompilationUnit sourceUnit,
CompilationUnitDeclaration parsedUnit)
protected void beginToCompile(ICompilationUnit[] sourceUnits)
protected void reportProgress(String taskDecription)
protected void reportWorked(int workIncrement,
int currentUnitIndex)
public void compile(ICompilationUnit[] sourceUnits)
public CompilationUnitDeclaration getUnitToProcess(int next)
public void setBinaryTypes(ReferenceBinding[] binaryTypes)
protected void handleInternalException(Throwable internalException,
CompilationUnitDeclaration unit,
CompilationResult result)
protected void handleInternalException(AbortCompilation abortException,
CompilationUnitDeclaration unit)
public void initializeParser()
protected void internalBeginToCompile(ICompilationUnit[] sourceUnits,
int maxUnits)
public void process(CompilationUnitDeclaration unit,
int i)
protected void processAnnotations()
public void reset()
public CompilationUnitDeclaration resolve(CompilationUnitDeclaration unit,
ICompilationUnit sourceUnit,
boolean verifyMethods,
boolean analyzeCode,
boolean generateCode)
public CompilationUnitDeclaration resolve(ICompilationUnit sourceUnit,
boolean verifyMethods,
boolean analyzeCode,
boolean generateCode)
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||