org.oddjob.values.types
Class ValueType

java.lang.Object
  extended byorg.oddjob.values.types.ValueType

public class ValueType
extends java.lang.Object

Description:
A simple value, the most common type.

A value can be:

Large amounts of text can also be declared inline if required.
Example:
 <sequential>
   <variables id="vars">
     <value name="fruit" value="apple"/>
   </variables>
   <echo text="${vars.fruit}"/>
 </sequential>
 
,
 <sequential>
   <variables id="vars2">
     <value name="more" value="${vars.fruit}"/>
   </variables>
   <echo text="${vars2.more}"/>
 </sequential>
 
,
 <sequential>
   <variables id="vars">
     <value name="essay">
 What a lot of text I'm now going to write...
     </value>
   </variables>
   <copy input="${vars.essay}" to="essay.txt"/>
 </sequential>
 
Author:
Rob Gordon.

Constructor Summary
ValueType()
           
 
Method Summary
 void addText(java.lang.String text)
           
 void setValue(java.lang.Object value)
           
 java.lang.String toString()
           
 java.lang.Object valueFor(java.lang.Class required)
          Resolve the value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ValueType

public ValueType()
Method Detail

setValue

public void setValue(java.lang.Object value)

valueFor

public java.lang.Object valueFor(java.lang.Class required)
Resolve the value.

Parameters:
required - The required class.
Returns:
The value. Could be null.

addText

public void addText(java.lang.String text)

toString

public java.lang.String toString()