Gant 1.9.6

org.codehaus.gant
[Groovy] Class GantBinding

java.lang.Object
  groovy.lang.GroovyObjectSupport
      groovy.lang.Binding
          org.codehaus.gant.GantBinding
All Implemented Interfaces:
java.lang.Cloneable

class GantBinding
extends groovy.lang.Binding

This class is a sub-class of groovy.lang.Binding to provide extra capabilities. In particular, all the extra bits needed in the binding for Gant to actually work at all. Handle this as a separate class to avoid replication of initialization if binding objects are cloned.

Authors:
Russel Winder


Constructor Summary
GantBinding()

Default constructor.

GantBinding(groovy.lang.Binding binding)

Constructor taking an explicit Binding as parameter.

GantBinding(org.apache.tools.ant.Project p)

Constructor taking an explicit Project as parameter.

 
Method Summary
void addBuildListener(org.apache.tools.ant.BuildListener buildListener)

Adds a BuildListener instance to this Gant instance

void forcedSettingOfVariable(java.lang.String name, java.lang.Object value)

setVariable includes tests for certain names so as to make them read only as far as the Gant script is concerned.

java.util.List getBuildListeners()

Getter for the list of build listeners.

java.lang.Object getVariable(java.lang.String name)

The method for getting values from the binding.

void removeBuildListener(org.apache.tools.ant.BuildListener buildListener)

Removes a BuildListener instance from this Gant instance

void setVariable(java.lang.String name, java.lang.Object value)

The method for setting values in the binding.

 
Methods inherited from class groovy.lang.Binding
groovy.lang.Binding#setProperty(java.lang.String, java.lang.Object), groovy.lang.Binding#getProperty(java.lang.String), groovy.lang.Binding#getVariable(java.lang.String), groovy.lang.Binding#setVariable(java.lang.String, java.lang.Object), groovy.lang.Binding#getVariables(), groovy.lang.Binding#getMetaClass(), groovy.lang.Binding#setMetaClass(groovy.lang.MetaClass), groovy.lang.Binding#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.Binding#wait(long), groovy.lang.Binding#wait(long, int), groovy.lang.Binding#wait(), groovy.lang.Binding#equals(java.lang.Object), groovy.lang.Binding#toString(), groovy.lang.Binding#hashCode(), groovy.lang.Binding#getClass(), groovy.lang.Binding#notify(), groovy.lang.Binding#notifyAll()
 
Methods inherited from class groovy.lang.GroovyObjectSupport
groovy.lang.GroovyObjectSupport#setProperty(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#getProperty(java.lang.String), groovy.lang.GroovyObjectSupport#getMetaClass(), groovy.lang.GroovyObjectSupport#setMetaClass(groovy.lang.MetaClass), groovy.lang.GroovyObjectSupport#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#wait(long), groovy.lang.GroovyObjectSupport#wait(long, int), groovy.lang.GroovyObjectSupport#wait(), groovy.lang.GroovyObjectSupport#equals(java.lang.Object), groovy.lang.GroovyObjectSupport#toString(), groovy.lang.GroovyObjectSupport#hashCode(), groovy.lang.GroovyObjectSupport#getClass(), groovy.lang.GroovyObjectSupport#notify(), groovy.lang.GroovyObjectSupport#notifyAll()
 
Methods inherited from class java.lang.Object
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Constructor Detail

GantBinding

GantBinding()
Default constructor.


GantBinding

GantBinding(groovy.lang.Binding binding)
Constructor taking an explicit Binding as parameter.
Parameters:
binding - The Binding to use as a base of maplets to initialize the GantBinding with.


GantBinding

GantBinding(org.apache.tools.ant.Project p)
Constructor taking an explicit Project as parameter.
Parameters:
p - The Project to use when initializing the GantBuilder.


 
Method Detail

addBuildListener

void addBuildListener(org.apache.tools.ant.BuildListener buildListener)
Adds a BuildListener instance to this Gant instance


forcedSettingOfVariable

void forcedSettingOfVariable(java.lang.String name, java.lang.Object value)
setVariable includes tests for certain names so as to make them read only as far as the Gant script is concerned. However the implementation code needs to be able to circumvent that checking, and so we provide this method for implementation code to force things at times other than initialization. This need came about in realizing GANT-44.
Parameters:
ant - the GantBuilder to assign to the 'ant' entry in the binding.


getBuildListeners

java.util.List getBuildListeners()
Getter for the list of build listeners. Used in gant.Gant.withBuildListeners.


getVariable

java.lang.Object getVariable(java.lang.String name)
The method for getting values from the binding. Ensures that Ant properties appear to be in the binding object.


removeBuildListener

void removeBuildListener(org.apache.tools.ant.BuildListener buildListener)
Removes a BuildListener instance from this Gant instance


setVariable

void setVariable(java.lang.String name, java.lang.Object value)
The method for setting values in the binding. Ensures that read-only values cannot be reset after initialization.
Parameters:
name - The symbol to define.
value - The value to associate with the name.


 

Copyright © 2006–9 The Codehaus. All Rights Reserved.