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 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 for
      encodings - the given encoding for the source units
      bindingKeys - the binding keys to create bindings for
      requestor - the AST requestor that collects abstract syntax trees and bindings
      apiLevel - Level of AST API desired.
      compilerOptions - Compiler options. Defaults to JavaCore.getOptions().
      classpathList - A list of classpaths to use during this operation
      flags - Flags to to be used during this operation
      monitor - 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 for
      requestor - the AST requestor that collects abstract syntax trees and bindings
      apiLevel - Level of AST API desired.
      compilerOptions - Compiler options. Defaults to JavaCore.getOptions().
      flags - Flags to to be used during this operation
      monitor - 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 for
      encodings - the given encoding for the source units
      requestor - the AST requester that collects abstract syntax trees and bindings
      apiLevel - Level of AST API desired.
      compilerOptions - Compiler options. Defaults to JavaCore.getOptions().
      flags - Flags to to be used during this operation
      monitor - 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 for
      bindingKeys - the binding keys to create bindings for
      requestor - the AST requester that collects abstract syntax trees and bindings
      apiLevel - Level of AST API desired.
      compilerOptions - Compiler options. Defaults to JavaCore.getOptions().
      project - The project providing the context of the resolution
      workingCopyOwner - The owner of the working copy
      flags - Flags to to be used during this operation
      monitor - 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 unit
      initialNeedsToResolveBinding - Initial guess as to whether we need to resolve bindings
      project - The project providing the context of the conversion
      classpaths - A list of classpaths to use during this operation
      focalPosition - a position to focus on, or -1 if N/A
      apiLevel - Level of AST API desired.
      compilerOptions - Compiler options. Defaults to JavaCore.getOptions().
      parsedUnitWorkingCopyOwner - The working copy owner of the unit
      typeRootWorkingCopyOwner - The working copy owner of the type
      flags - Flags to to be used during this operation
      monitor - A progress monitor
      Returns:
      A CompilationUnit