aminePlatform.engines.synergy.bindingContext
Class SynergyBindingContext

java.lang.Object
  extended byaminePlatform.engines.synergy.bindingContext.SynergyBindingContext
All Implemented Interfaces:
BindingContext

public class SynergyBindingContext
extends java.lang.Object
implements BindingContext


Constructor Summary
SynergyBindingContext()
           
 
Method Summary
 void clearCGConstrs()
          Clear the set of constraints that was formed during a CG unification
 CGOperations getCGOperations()
           
 ObjectWithBindInf getValue(java.lang.Object obj, java.lang.Object bindInf)
          getValue for the specified object obj according to its binding information.
 boolean isBoundVariable(java.lang.Object obj, java.lang.Object bindInf)
           
 boolean isFreeVariable(java.lang.Object obj, java.lang.Object bindInf)
           
 void removeCGUnifConstrs()
          remove the binding that occurred during unification of two CGs
 void setCGUnification(boolean cgUnification)
          Set the value for the boolean attribute that indicate if this binding context is concerned by CG unification
 void setValue(java.lang.Object variable, java.lang.Object bindInfVar, java.lang.Object value, java.lang.Object bindInf)
          Associate in the specified activation record bindInf the association between variable and value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SynergyBindingContext

public SynergyBindingContext()
Method Detail

getValue

public ObjectWithBindInf getValue(java.lang.Object obj,
                                  java.lang.Object bindInf)
getValue for the specified object obj according to its binding information. Binding information is the activation record (ActivationRecord) where obj is defined. The attribute binding, which is a HashMap, contains the binding of all the variable of the activation record. So getValue() will search the value for binding HashMap.

Specified by:
getValue in interface BindingContext
Parameters:
obj -
bindInf -
Returns:

setValue

public void setValue(java.lang.Object variable,
                     java.lang.Object bindInfVar,
                     java.lang.Object value,
                     java.lang.Object bindInf)
Associate in the specified activation record bindInf the association between variable and value.

Specified by:
setValue in interface BindingContext
Parameters:
variable - A variable
bindInfVar - not used in this case
value - An object to consider as a value for variable
bindInf - Binding Information which correspond to an ActivationRecord

getCGOperations

public CGOperations getCGOperations()
Specified by:
getCGOperations in interface BindingContext

isFreeVariable

public boolean isFreeVariable(java.lang.Object obj,
                              java.lang.Object bindInf)
Specified by:
isFreeVariable in interface BindingContext

isBoundVariable

public boolean isBoundVariable(java.lang.Object obj,
                               java.lang.Object bindInf)
Specified by:
isBoundVariable in interface BindingContext

setCGUnification

public void setCGUnification(boolean cgUnification)
Set the value for the boolean attribute that indicate if this binding context is concerned by CG unification

Specified by:
setCGUnification in interface BindingContext
Parameters:
cgUnification - true to indicate the occurrence of CG unification and false otherwise

removeCGUnifConstrs

public void removeCGUnifConstrs()
remove the binding that occurred during unification of two CGs

Specified by:
removeCGUnifConstrs in interface BindingContext

clearCGConstrs

public void clearCGConstrs()
Clear the set of constraints that was formed during a CG unification

Specified by:
clearCGConstrs in interface BindingContext