Class BindingSet


  • public class BindingSet
    extends java.lang.Object
    A set of Bindings, which are definitions of variables occuring in a ByteCodePattern. BindingSets are immutable; to add a binding, a new cell is allocated. (Are we CONSING yet?)
    Author:
    David Hovemeyer
    See Also:
    Binding
    • Constructor Summary

      Constructors 
      Constructor Description
      BindingSet​(Binding binding, BindingSet parent)
      Constructor; creates a new BindingSet as an extension of an existing one.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Binding lookup​(java.lang.String varName)
      Look for a Binding for given variable.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • BindingSet

        public BindingSet​(Binding binding,
                          BindingSet parent)
        Constructor; creates a new BindingSet as an extension of an existing one.
        Parameters:
        binding - a variable binding
        parent - the parent BindingSet, containing other bindings
    • Method Detail

      • lookup

        public Binding lookup​(java.lang.String varName)
        Look for a Binding for given variable.
        Parameters:
        varName - name of the variable
        Returns:
        the Binding, or null if no such Binding is present in the set
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object