public abstract class ModelScope extends java.lang.Object implements ParserScope
getScopedVariable(Variable, NamedObj, String)
is the
primary entry point, used by the Expression actor and other code
to look up Variables by name.
PtParser
Constructor and Description |
---|
ModelScope() |
Modifier and Type | Method and Description |
---|---|
static java.util.Set<java.lang.String> |
getAllScopedObjectNames(NamedObj container)
Return a list of object names in scope for variables in the
given container.
|
static java.util.Set<java.lang.String> |
getAllScopedVariableNames(Variable exclude,
NamedObj container)
Return a list of variable names in scope for variables in the
given container.
|
static Attribute |
getScopedAttribute(Attribute exclude,
NamedObj container,
java.lang.String name)
Get the attribute with the given name in the scope of the given
container.
|
static NamedObj |
getScopedObject(NamedObj container,
java.lang.String name)
Get the NamedObj with the given name in the scope of the given
container.
|
static Variable |
getScopedVariable(Variable exclude,
NamedObj container,
java.lang.String name)
Get the variable with the given name in the scope of the given
container.
|
static Token |
preferenceValue(NamedObj context,
java.lang.String preferenceName)
Check to see whether a preference of the specified name is
defined in the specified context, and if it is, return its value.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
get, getType, getTypeTerm, identifierSet
public static java.util.Set<java.lang.String> getAllScopedObjectNames(NamedObj container)
container
- The container of this scope.public static java.util.Set<java.lang.String> getAllScopedVariableNames(Variable exclude, NamedObj container)
exclude
- The variable to exclude from the scope.container
- The container of this scope.public static Attribute getScopedAttribute(Attribute exclude, NamedObj container, java.lang.String name)
exclude
- An attribute to exclude from the search.container
- The container to search upwards from.name
- The attribute name to search for.public static NamedObj getScopedObject(NamedObj container, java.lang.String name)
container
- The container to search upwards from.name
- The object name to search for.public static Variable getScopedVariable(Variable exclude, NamedObj container, java.lang.String name)
exclude
- A variable to exclude from the search.container
- The container to search upwards from.name
- The variable name to search for.public static Token preferenceValue(NamedObj context, java.lang.String preferenceName)
context
- The context for the preference.preferenceName
- The name of the preference.