public class ValueType extends java.lang.Object implements ArooaValue, java.io.Serializable
A value can be:
The ValueType value is expected to be an ArooaValue
. This ensures
that references to other types aren't converted until the ValueType
itself is converted. Because of this, simple values will be wrapped
as an ArooaObject
by the automatic internal conversion. For
normal use this is entirely transparent. An example below demonstrates
this.
<value value="apple"/>
<value value="${vars.fruit}"/>
<oddjob> <job> <sequential> <jobs> <variables id="vars"> <fruit> <value value="apple"/> </fruit> </variables> <echo>${vars.fruit} ${vars.fruit.class} ${vars.fruit.value} ${vars.fruit.value.class} ${vars.fruit.value.value} ${vars.fruit.value.value.class}</echo> </jobs> </sequential> </job> </oddjob>The output is:
apple class org.oddjob.arooa.types.ValueType apple class org.oddjob.arooa.types.ArooaObject apple class java.lang.String
Modifier and Type | Class and Description |
---|---|
static class |
ValueType.Conversions |
static class |
ValueType.ValueDesignFactory |
Modifier and Type | Field and Description |
---|---|
static ArooaElement |
ELEMENT |
Constructor and Description |
---|
ValueType() |
Modifier and Type | Method and Description |
---|---|
ArooaValue |
getValue() |
void |
setValue(ArooaValue value) |
java.lang.String |
toString() |
public static final ArooaElement ELEMENT
public void setValue(ArooaValue value)
Property: value
Description: The value.
Required: No.
public ArooaValue getValue()
public java.lang.String toString()
toString
in class java.lang.Object