Class CompilationUnitProblemFinder
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.compiler.Compiler
org.aspectj.org.eclipse.jdt.internal.core.CompilationUnitProblemFinder
- All Implemented Interfaces:
ITypeRequestor,ProblemSeverities
Responsible for resolving types inside a compilation unit being reconciled,
reporting the discovered problems to a given IProblemRequestor.
-
Field Summary
Fields inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.Compiler
annotationProcessorManager, annotationProcessorStartIndex, DEBUG, DebugRequestor, lookupEnvironment, options, out, parser, parseThreshold, problemReporter, progress, referenceBindings, remainingIterations, requestor, stats, totalUnits, unitsToProcess, useSingleThreadFields inherited from interface org.aspectj.org.eclipse.jdt.internal.compiler.problem.ProblemSeverities
Abort, AbortCompilation, AbortCompilationUnit, AbortMethod, AbortType, CoreSeverityMASK, Error, Fatal, Ignore, Info, InternalError, Optional, SecondaryError, Warning -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCompilationUnitProblemFinder(INameEnvironment environment, IErrorHandlingPolicy policy, CompilerOptions compilerOptions, ICompilerRequestor requestor, IProblemFactory problemFactory) Answer a new CompilationUnitVisitor using the given name environment and compiler options. -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(IModule module, LookupEnvironment environment) Accept the requested module, could come in in one of 3 different forms:IBinaryModuleISourceModuleIModule.AutoModulevoidaccept(ISourceType[] sourceTypes, PackageBinding packageBinding, AccessRestriction accessRestriction) Add additional source typesprotected static CompilerOptionsgetCompilerOptions(Map<String, String> settings, boolean creatingAST, boolean statementsRecovery) protected static IErrorHandlingPolicyprotected static ICompilerRequestorvoidstatic CompilationUnitDeclarationprocess(CompilationUnit unitElement, WorkingCopyOwner workingCopyOwner, Map<String, CategorizedProblem[]> problems, boolean creatingAST, int reconcileFlags, org.eclipse.core.runtime.IProgressMonitor monitor) static CompilationUnitDeclarationprocess(CompilationUnit unitElement, SourceElementParser parser, WorkingCopyOwner workingCopyOwner, Map<String, CategorizedProblem[]> problems, boolean creatingAST, int reconcileFlags, org.eclipse.core.runtime.IProgressMonitor monitor) Methods inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.Compiler
accept, accept, addCompilationUnit, backupAptProblems, beginToCompile, compile, getUnitToProcess, handleInternalException, handleInternalException, internalBeginToCompile, process, processAnnotations, processCompiledUnits, reportProgress, reportWorked, reset, resolve, resolve, restoreAptProblems, setBinaryTypes, shouldCleanup
-
Constructor Details
-
CompilationUnitProblemFinder
protected CompilationUnitProblemFinder(INameEnvironment environment, IErrorHandlingPolicy policy, CompilerOptions compilerOptions, ICompilerRequestor requestor, IProblemFactory problemFactory) Answer a new CompilationUnitVisitor using the given name environment and compiler options. The environment and options will be in effect for the lifetime of the compiler. When the compiler is run, compilation results are sent to the given requestor.- Parameters:
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.compilerOptions- The compiler options to use for the resolution.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.- See Also:
-
-
Method Details
-
accept
public void accept(ISourceType[] sourceTypes, PackageBinding packageBinding, AccessRestriction accessRestriction) Add additional source types- Specified by:
acceptin interfaceITypeRequestor- Overrides:
acceptin classCompiler
-
accept
Description copied from interface:ITypeRequestorAccept the requested module, could come in in one of 3 different forms:IBinaryModuleISourceModule- IModule.AutoModule
-
getCompilerOptions
protected static CompilerOptions getCompilerOptions(Map<String, String> settings, boolean creatingAST, boolean statementsRecovery) -
getHandlingPolicy
-
getRequestor
-
process
public static CompilationUnitDeclaration process(CompilationUnit unitElement, SourceElementParser parser, WorkingCopyOwner workingCopyOwner, Map<String, CategorizedProblem[]> problems, boolean creatingAST, int reconcileFlags, org.eclipse.core.runtime.IProgressMonitor monitor) throws JavaModelException- Throws:
JavaModelException
-
process
public static CompilationUnitDeclaration process(CompilationUnit unitElement, WorkingCopyOwner workingCopyOwner, Map<String, CategorizedProblem[]> problems, boolean creatingAST, int reconcileFlags, org.eclipse.core.runtime.IProgressMonitor monitor) throws JavaModelException- Throws:
JavaModelException
-
initializeParser
public void initializeParser()- Overrides:
initializeParserin classCompiler
-