Dresden OCL Toolkit

tudresden.ocl.check
Interface NameBoundQueryable

All Superinterfaces:
Switch
All Known Subinterfaces:
TypeQueryable
All Known Implementing Classes:
NameBinder, OclTree, TypeChecker

public interface NameBoundQueryable
extends Switch

A interface defining operations necessary for simple normalization steps. It allows to ask if a name is bound to some OCL variable (self is considered a variable) and to query the default context (i.e. "self" or some iterator).

Author:
Frank Finger

Method Summary
 void changeNotify(Node subtree)
          notify the NameBoundQueryable that the ASTs subtree starting at the node given as parameter may have changed
 HashSet getBoundNames(Node n)
           
 String getDefaultContext(Node n)
           
 boolean isNameBound(String name, Node node)
           
 

Method Detail

isNameBound

public boolean isNameBound(String name,
                           Node node)
Returns:
true if the given String denotes a OCL variable in the given node and namespace

getBoundNames

public HashSet getBoundNames(Node n)
Returns:
all names that are bound in the given node

getDefaultContext

public String getDefaultContext(Node n)
Returns:
a String representing the default context in the given node, which is either "self" or the name of an iterator; returns null if there is no default context, e.g. the iterator is not named

changeNotify

public void changeNotify(Node subtree)
notify the NameBoundQueryable that the ASTs subtree starting at the node given as parameter may have changed


Dresden OCL Toolkit

Submit a bug
Developed at the Dresden University of Technology.
This software is published under the GNU Lesser General Public License.