|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectptolemy.data.expr.ModelScope
ptolemy.domains.ptera.kernel.VariableScope
public class VariableScope
The parser scope that resolves names as attributes of a given container and those of a superscope. To resolve a name, it first tries to find an attribute belonging to the container given to its constructor. If not found, it passes the name resolution request to the superscope, if given.
| Red (tfeng) |
| Yellow (tfeng) |
| Field Summary | |
|---|---|
private NamedObj |
_container
The container in which attributes are looked up. |
private ParserScope |
_superScope
The superscope. |
| Constructor Summary | |
|---|---|
VariableScope(NamedObj container)
Construct a scope for the given container without a superscope. |
|
VariableScope(NamedObj container,
ParserScope superScope)
Construct a scope for the given container with a superscope. |
|
| Method Summary | |
|---|---|
Token |
get(java.lang.String name)
Look up and return the value with the specified name in the scope. |
Type |
getType(java.lang.String name)
Look up and return the type of the value with the specified name in the scope. |
InequalityTerm |
getTypeTerm(java.lang.String name)
Look up and return the type term for the specified name in the scope. |
java.util.Set<?> |
identifierSet()
Return a list of names corresponding to the identifiers defined by this scope. |
| Methods inherited from class ptolemy.data.expr.ModelScope |
|---|
getAllScopedObjectNames, getAllScopedVariableNames, getScopedAttribute, getScopedObject, getScopedVariable, preferenceValue |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private NamedObj _container
private ParserScope _superScope
| Constructor Detail |
|---|
public VariableScope(NamedObj container)
container - The container in which attributes are looked up.
public VariableScope(NamedObj container,
ParserScope superScope)
container - The container in which attributes are looked up.superScope - If not null, the scope to search if no attribute of
a given name can be found in the container.| Method Detail |
|---|
public Token get(java.lang.String name)
throws IllegalActionException
name - The name of the variable to be looked up.
IllegalActionException - If a value in the scope
exists with the given name, but cannot be evaluated.
public Type getType(java.lang.String name)
throws IllegalActionException
name - The name of the variable to be looked up.
IllegalActionException - If a value in the scope
exists with the given name, but cannot be evaluated.
public InequalityTerm getTypeTerm(java.lang.String name)
throws IllegalActionException
name - The name of the variable to be looked up.
IllegalActionException - If a value in the scope
exists with the given name, but cannot be evaluated.
public java.util.Set<?> identifierSet()
throws IllegalActionException
IllegalActionException - If constructing the list causes
it.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||