java.lang.Object
net.sourceforge.pmd.lang.modelica.resolver.RootScope
All Implemented Interfaces:
ModelicaScope

public final class RootScope extends Object
A pseudo lexical scope corresponding to "unnamed enclosing class" for top-level entities. See "5.2 Enclosing Classes" from MLS 3.4. Unlike in MLS, this class aggregates source file scopes, not the top-level entities themselves.
  • Constructor Details

    • RootScope

      public RootScope()
  • Method Details

    • resolveLexically

      public void resolveLexically(net.sourceforge.pmd.lang.modelica.resolver.internal.ResolutionContext result, CompositeName name) throws net.sourceforge.pmd.lang.modelica.resolver.internal.Watchdog.CountdownException
      Throws:
      net.sourceforge.pmd.lang.modelica.resolver.internal.Watchdog.CountdownException
    • getRoot

      public RootScope getRoot()
      Specified by:
      getRoot in interface ModelicaScope
    • toString

      public String toString()
    • getRepresentation

      public String getRepresentation()
    • getParent

      public ModelicaScope getParent()
      Description copied from interface: ModelicaScope
      Returns the parent (i.e., containing) scope.
      Specified by:
      getParent in interface ModelicaScope
    • getContainedDeclarations

      public List<ModelicaDeclaration> getContainedDeclarations()
      Description copied from interface: ModelicaScope
      Returns the declarations that were lexically declared in this scope.
      Specified by:
      getContainedDeclarations in interface ModelicaScope
    • safeResolveLexically

      public <T extends ResolvableEntity> ResolutionResult<T> safeResolveLexically(Class<T> clazz, net.sourceforge.pmd.lang.modelica.resolver.internal.ResolutionState state, CompositeName name)
      Description copied from interface: ModelicaScope
      Resolves a name as if it is written inside this lexical scope in a file.
      Specified by:
      safeResolveLexically in interface ModelicaScope