org.codehaus.groovy.binding
Class BindPath

java.lang.Object
  extended by org.codehaus.groovy.binding.BindPath

public class BindPath
extends java.lang.Object

The bind path object. This class represents one "step" in the bind path.


Field Summary
(package private)  BindPath[] children
          The steps further down the path from us
(package private)  java.lang.Object currentObject
          The object we think we are bound to
(package private) static java.lang.Class[] GLOBAL_PARAMS
           
(package private)  java.beans.PropertyChangeListener globalListener
           
(package private)  java.beans.PropertyChangeListener localListener
           
(package private)  java.util.Map<java.lang.String,TriggerBinding> localSynthetics
          The local lookup for syhtnetic properties, like JTextField#text
(package private) static java.lang.Class[] NAME_PARAMS
           
(package private)  java.lang.String propertyName
          The proeprty we are intiereted in
(package private)  BindingUpdatable syntheticFullBinding
           
 
Constructor Summary
BindPath()
           
 
Method Summary
 void addAllListeners(java.beans.PropertyChangeListener listener, java.lang.Object newObject, java.util.Set updateSet)
          Adds all the listeners to the objects in the bind path.
 void addListeners(java.beans.PropertyChangeListener listener, java.lang.Object newObject, java.util.Set updateSet)
          Add listeners to a specific object.
private  java.lang.Object extractNewValue(java.lang.Object newObject)
           
 TriggerBinding getSyntheticTriggerBinding(java.lang.Object newObject)
           
 void removeListeners()
          Remove listeners, believeing that our bould flags are accurate and it removes only as declared.
 void updateLocalSyntheticProperties(java.util.Map<java.lang.String,TriggerBinding> synthetics)
           
 void updatePath(java.beans.PropertyChangeListener listener, java.lang.Object newObject, java.util.Set updateSet)
          Called when we detect a change somewherer down our path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

localSynthetics

java.util.Map<java.lang.String,TriggerBinding> localSynthetics
The local lookup for syhtnetic properties, like JTextField#text


currentObject

java.lang.Object currentObject
The object we think we are bound to


propertyName

java.lang.String propertyName
The proeprty we are intiereted in


localListener

java.beans.PropertyChangeListener localListener

globalListener

java.beans.PropertyChangeListener globalListener

syntheticFullBinding

BindingUpdatable syntheticFullBinding

children

BindPath[] children
The steps further down the path from us


NAME_PARAMS

static final java.lang.Class[] NAME_PARAMS

GLOBAL_PARAMS

static final java.lang.Class[] GLOBAL_PARAMS
Constructor Detail

BindPath

public BindPath()
Method Detail

updatePath

public void updatePath(java.beans.PropertyChangeListener listener,
                       java.lang.Object newObject,
                       java.util.Set updateSet)
Called when we detect a change somewherer down our path. First, check to see if our object is changing. If so remove our old listener Next, update the reference object the children have and recurse Finally, add listeners if we have a different object

Parameters:
listener - This listener to attach.
newObject - The object we should read our property off of.
updateSet - The list of objects we have added listeners to

addAllListeners

public void addAllListeners(java.beans.PropertyChangeListener listener,
                            java.lang.Object newObject,
                            java.util.Set updateSet)
Adds all the listeners to the objects in the bind path. This assumes that we are not added as listeners to any of them, hence it is not idempotent.

Parameters:
listener - This listener to attach.
newObject - The object we should read our property off of.
updateSet - The list of objects we have added listeners to

extractNewValue

private java.lang.Object extractNewValue(java.lang.Object newObject)

addListeners

public void addListeners(java.beans.PropertyChangeListener listener,
                         java.lang.Object newObject,
                         java.util.Set updateSet)
Add listeners to a specific object. Updates the bould flags and update set

Parameters:
listener - This listener to attach.
newObject - The object we should read our property off of.
updateSet - The list of objects we have added listeners to

removeListeners

public void removeListeners()
Remove listeners, believeing that our bould flags are accurate and it removes only as declared.


updateLocalSyntheticProperties

public void updateLocalSyntheticProperties(java.util.Map<java.lang.String,TriggerBinding> synthetics)

getSyntheticTriggerBinding

public TriggerBinding getSyntheticTriggerBinding(java.lang.Object newObject)


Copyright © ${year} The Codehaus. All Rights Reserved.