Class RootScope
java.lang.Object
net.sourceforge.pmd.lang.modelica.resolver.RootScope
- All Implemented Interfaces:
ModelicaScope
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the declarations that were lexically declared in this scope.Returns the parent (i.e., containing) scope.getRoot()voidresolveLexically(net.sourceforge.pmd.lang.modelica.resolver.internal.ResolutionContext result, CompositeName name) <T extends ResolvableEntity>
ResolutionResult<T>safeResolveLexically(Class<T> clazz, net.sourceforge.pmd.lang.modelica.resolver.internal.ResolutionState state, CompositeName name) Resolves a name as if it is written inside this lexical scope in a file.toString()
-
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
- Specified by:
getRootin interfaceModelicaScope
-
toString
-
getRepresentation
-
getParent
Description copied from interface:ModelicaScopeReturns the parent (i.e., containing) scope.- Specified by:
getParentin interfaceModelicaScope
-
getContainedDeclarations
Description copied from interface:ModelicaScopeReturns the declarations that were lexically declared in this scope.- Specified by:
getContainedDeclarationsin interfaceModelicaScope
-
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:ModelicaScopeResolves a name as if it is written inside this lexical scope in a file.- Specified by:
safeResolveLexicallyin interfaceModelicaScope
-