java.lang.Object
io.github.potjerodekool.nabu.resolve.scope.GlobalScope
All Implemented Interfaces:
Scope

public class GlobalScope extends Object implements Scope
Global scope.
  • Constructor Details

  • Method Details

    • getGlobalScope

      public GlobalScope getGlobalScope()
      Specified by:
      getGlobalScope in interface Scope
      Returns:
      Returns the global scope or null if not found.
    • define

      public void define(Element element)
      Specified by:
      define in interface Scope
      Parameters:
      element - An element. Add an element to the scope.
    • resolve

      public Element resolve(String name)
      Specified by:
      resolve in interface Scope
      Parameters:
      name - An element name.
      Returns:
      Returns the resolved element with the given name or null if not found.
    • getCompilationUnit

      public CompilationUnit getCompilationUnit()
      Specified by:
      getCompilationUnit in interface Scope
      Returns:
      Returns the compilation unit of the scope or null if not found.
    • getCompilerContext

      public CompilerContext getCompilerContext()
    • getPackageElement

      public PackageElement getPackageElement()
      Specified by:
      getPackageElement in interface Scope
      Returns:
      Returns the package element of this scope or null.
    • setPackageElement

      public void setPackageElement(PackageElement packageElement)
      Specified by:
      setPackageElement in interface Scope
      Parameters:
      packageElement - Package element to set on this scope.
    • findModuleElement

      public ModuleElement findModuleElement()
      Specified by:
      findModuleElement in interface Scope
      Returns:
      Returns the module element of this scope or null.
    • resolveType

      public TypeMirror resolveType(String name)
      Specified by:
      resolveType in interface Scope
      Parameters:
      name - An element name.
      Returns:
      Return the resolved type or null if not found.