|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.tuberlin.cs.cis.ocl.env.Environment
The Environment of the validator.
Constructor Summary | |
Environment()
Constructs an environment |
Method Summary | |
void |
bind(Binding binding)
Inserts a binding into the environment. |
boolean |
contains(Identifier id)
Determines if the identifier is already bound in the environment |
Binding |
lookup(Identifier id)
Resolves a binding for an identifier. |
Binding |
lookupName(de.tuberlin.cs.cis.ocl.parser.node.Node origin,
de.tuberlin.cs.cis.ocl.parser.node.PName name)
Resolves a name-binding for a name originated at a distinct point in input constraints. |
Binding |
lookupName(de.tuberlin.cs.cis.ocl.parser.node.PName name)
Resolves a name-binding for a name. |
Binding |
lookupOperation(de.tuberlin.cs.cis.ocl.parser.node.Node origin,
Classifier classifier,
de.tuberlin.cs.cis.ocl.parser.node.PName name,
Type[] params)
Resolves an operation defined on a classifier (via an let-expression) with the specified name and parameters. |
Binding |
lookupProperty(de.tuberlin.cs.cis.ocl.parser.node.Node origin,
Classifier classifier,
de.tuberlin.cs.cis.ocl.parser.node.PName name)
Resolves a property defined on a classifier (via an let-expression) with the specified name. |
void |
remove(Identifier id)
Removes an identifier and its binding from the environment. |
void |
reserve(Identifier id)
Reserves an Identifier in the environment. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Environment()
Method Detail |
public boolean contains(Identifier id)
id
- an identifier
true
if the identifier is already bound,
otherwise false
.public void reserve(Identifier id) throws AlreadyBoundException
id
- an identifier.
AlreadyBoundException
- if the identifier is already bound.public void bind(Binding binding) throws AlreadyBoundException
binding
- A binding containing an identifier and bound
values.
AlreadyBoundException
- if the identifier contained in
the binding is already bound.public void remove(Identifier id)
id
- an identifier.public Binding lookup(Identifier id) throws BindingNotFoundException
id
- an identifier
BindingNotFoundException
- if the identifier is not bound
within the environment.public Binding lookupName(de.tuberlin.cs.cis.ocl.parser.node.PName name) throws BindingNotFoundException
name
- a name
NameIdentifier
).
BindingNotFoundException
- if the name is not bound within
the environmentpublic Binding lookupName(de.tuberlin.cs.cis.ocl.parser.node.Node origin, de.tuberlin.cs.cis.ocl.parser.node.PName name) throws BindingNotFoundException
origin
- used to classifier the scope the name is used in.name
- the name to be resolved at origin.
BindingNotFoundException
- if the name is not bound within
the environment.public Binding lookupProperty(de.tuberlin.cs.cis.ocl.parser.node.Node origin, Classifier classifier, de.tuberlin.cs.cis.ocl.parser.node.PName name) throws BindingNotFoundException
origin
- used to determine the scope the property is used in.classifier
- the classifier the property must be defined on.name
- the name of the property
BindingNotFoundException
- if the property is not bound within
the environmentpublic Binding lookupOperation(de.tuberlin.cs.cis.ocl.parser.node.Node origin, Classifier classifier, de.tuberlin.cs.cis.ocl.parser.node.PName name, Type[] params) throws BindingNotFoundException
origin
- used to determine the scope the operation is used in.classifier
- the classifier the operation must be defined on.name
- the name of the operationparams
- the parameters of the operation
BindingNotFoundException
- if the property is not bound within
the environment
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |