Interface ICompilationUnitResolver
public interface ICompilationUnitResolver
This interface is used to resolve a jdt dom tree from source files.
It is contributed to via the compilationUnitResolver extension point.
This interface is currently internal only, and is not considered API.
This interface may be modified, changed, or removed at any time.
EXPERIMENTAL. This class or interface has been added as part of a work in progress. There is no guarantee that this API will work or that it will remain the same. Please do not use this API without consulting with the Red Hat team.
See https://github.com/eclipse-jdt/eclipse.jdt.core/issues/2641 for discussion on possible changes to this interface-
Method Summary
Modifier and TypeMethodDescriptionvoidparse(String[] sourceFilePaths, String[] encodings, FileASTRequestor requestor, int apiLevel, Map<String, String> compilerOptions, int flags, org.eclipse.core.runtime.IProgressMonitor monitor) Parse the given source paths with the following options.voidparse(ICompilationUnit[] compilationUnits, ASTRequestor requestor, int apiLevel, Map<String, String> compilerOptions, int flags, org.eclipse.core.runtime.IProgressMonitor monitor) Parse the ASTs for the given source units using the following options.voidresolve(String[] sourceFilePaths, String[] encodings, String[] bindingKeys, FileASTRequestor requestor, int apiLevel, Map<String, String> compilerOptions, List<FileSystem.Classpath> classpathList, int flags, org.eclipse.core.runtime.IProgressMonitor monitor) Parse the ASTs and resolve the bindings for the given source files using the following options.voidresolve(ICompilationUnit[] compilationUnits, String[] bindingKeys, ASTRequestor requestor, int apiLevel, Map<String, String> compilerOptions, IJavaProject project, WorkingCopyOwner workingCopyOwner, int flags, org.eclipse.core.runtime.IProgressMonitor monitor) Parse and resolve bindings for the given compilation units with the following options.toCompilationUnit(ICompilationUnit sourceUnit, boolean initialNeedsToResolveBinding, IJavaProject project, List<FileSystem.Classpath> classpaths, int focalPosition, int apiLevel, Map<String, String> compilerOptions, WorkingCopyOwner parsedUnitWorkingCopyOwner, WorkingCopyOwner typeRootWorkingCopyOwner, int flags, org.eclipse.core.runtime.IProgressMonitor monitor) Convert the given source unit into a CompilationUnit using the following options.
-
Method Details
-
resolve
void resolve(String[] sourceFilePaths, String[] encodings, String[] bindingKeys, FileASTRequestor requestor, int apiLevel, Map<String, String> compilerOptions, List<FileSystem.Classpath> classpathList, int flags, org.eclipse.core.runtime.IProgressMonitor monitor) Parse the ASTs and resolve the bindings for the given source files using the following options.- Parameters:
sourceFilePaths- the compilation units to create ASTs forencodings- the given encoding for the source unitsbindingKeys- the binding keys to create bindings forrequestor- the AST requestor that collects abstract syntax trees and bindingsapiLevel- Level of AST API desired.compilerOptions- Compiler options. Defaults to JavaCore.getOptions().classpathList- A list of classpaths to use during this operationflags- Flags to to be used during this operationmonitor- A progress monitor
-
parse
void parse(ICompilationUnit[] compilationUnits, ASTRequestor requestor, int apiLevel, Map<String, String> compilerOptions, int flags, org.eclipse.core.runtime.IProgressMonitor monitor) Parse the ASTs for the given source units using the following options.- Parameters:
compilationUnits- the compilation units to create ASTs forrequestor- the AST requestor that collects abstract syntax trees and bindingsapiLevel- Level of AST API desired.compilerOptions- Compiler options. Defaults to JavaCore.getOptions().flags- Flags to to be used during this operationmonitor- A progress monitor
-
parse
void parse(String[] sourceFilePaths, String[] encodings, FileASTRequestor requestor, int apiLevel, Map<String, String> compilerOptions, int flags, org.eclipse.core.runtime.IProgressMonitor monitor) Parse the given source paths with the following options.- Parameters:
sourceFilePaths- the compilation units to create ASTs forencodings- the given encoding for the source unitsrequestor- the AST requester that collects abstract syntax trees and bindingsapiLevel- Level of AST API desired.compilerOptions- Compiler options. Defaults to JavaCore.getOptions().flags- Flags to to be used during this operationmonitor- A progress monitor
-
resolve
void resolve(ICompilationUnit[] compilationUnits, String[] bindingKeys, ASTRequestor requestor, int apiLevel, Map<String, String> compilerOptions, IJavaProject project, WorkingCopyOwner workingCopyOwner, int flags, org.eclipse.core.runtime.IProgressMonitor monitor) Parse and resolve bindings for the given compilation units with the following options.- Parameters:
compilationUnits- the compilation units to create ASTs forbindingKeys- the binding keys to create bindings forrequestor- the AST requester that collects abstract syntax trees and bindingsapiLevel- Level of AST API desired.compilerOptions- Compiler options. Defaults to JavaCore.getOptions().project- The project providing the context of the resolutionworkingCopyOwner- The owner of the working copyflags- Flags to to be used during this operationmonitor- A progress monitor
-
toCompilationUnit
CompilationUnit toCompilationUnit(ICompilationUnit sourceUnit, boolean initialNeedsToResolveBinding, IJavaProject project, List<FileSystem.Classpath> classpaths, int focalPosition, int apiLevel, Map<String, String> compilerOptions, WorkingCopyOwner parsedUnitWorkingCopyOwner, WorkingCopyOwner typeRootWorkingCopyOwner, int flags, org.eclipse.core.runtime.IProgressMonitor monitor) Convert the given source unit into a CompilationUnit using the following options.- Parameters:
sourceUnit- A source unitinitialNeedsToResolveBinding- Initial guess as to whether we need to resolve bindingsproject- The project providing the context of the conversionclasspaths- A list of classpaths to use during this operationfocalPosition- a position to focus on, or -1 if N/AapiLevel- Level of AST API desired.compilerOptions- Compiler options. Defaults to JavaCore.getOptions().parsedUnitWorkingCopyOwner- The working copy owner of the unittypeRootWorkingCopyOwner- The working copy owner of the typeflags- Flags to to be used during this operationmonitor- A progress monitor- Returns:
- A CompilationUnit
-