|
ALBPM Process API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfuego.lang.DynamicObject
public abstract class DynamicObject
Nested Class Summary | |
---|---|
static interface |
DynamicObject.Dynamizable
Interface Dynamizable |
static class |
DynamicObject.Quote
This class allow the quoting of dynamic objects |
static class |
DynamicObject.X
|
Field Summary | |
---|---|
static DynamicObject |
NULL
|
static String |
PARENT_REFERENCE_FIELD
|
Constructor Summary | |
---|---|
DynamicObject()
|
Method Summary | ||
---|---|---|
void |
addElement(boolean value)
Adds the specified value at the end of this DynamicObject if it's a List, otherwise it'll throw an UnsupportedOperationException. |
|
void |
addElement(double value)
Adds the specified value at the end of this DynamicObject if it's a List, otherwise it'll throw an UnsupportedOperationException. |
|
void |
addElement(long value)
Adds the specified value at the end of this DynamicObject if it's a List, otherwise it'll throw an UnsupportedOperationException. |
|
void |
addElement(Object value)
Adds the specified value at the end of this DynamicObject if it's a List, otherwise it'll throw an UnsupportedOperationException. |
|
Map<DynamicObject,DynamicObject> |
asAssociativeArray()
|
|
DynamicObject |
asDynamicObject()
|
|
Map<String,Object> |
asFieldsMap()
Returns a view of this DynamicObject as a Map of Fields. |
|
List<Object> |
asList()
Returns a view of this DynamicObject as a List. |
|
Map<String,Object> |
asMap()
Returns a view of this DynamicObject as a Map. |
|
boolean |
booleanValue()
Returns this DynamicObject as a boolean. |
|
boolean |
contains(String argumentName)
|
|
|
convertTo(Class<T> target)
|
|
|
convertTo(Class<T> target,
Class elementType,
Map<Object,Object> references)
|
|
|
convertTo(Class<T> target,
Map<Object,Object> references)
Converts this DynamicObject to the specified target class. |
|
Object |
convertTo(Field field)
Converts this DynamicObject to the specified field type |
|
static DynamicObject |
create()
Creates a new DynamicObject that represents a Composite Object. |
|
static DynamicObject |
createList()
Creates a new DynamicObject that represents a List |
|
static DynamicObject |
createMap()
Creates a new DynamicObject that represents a Map |
|
BigDecimal |
decimalValue()
Returns this BigDecimal as a long. |
|
static DynamicObject |
defaultValueOf(Object value)
Returns the DynamicObject representation of the specified argument. |
|
static DynamicObject |
defaultValueOf(Object value,
boolean quote)
|
|
static DynamicObject |
defaultValueOf(Object value,
boolean quote,
Map<Object,Object> references)
|
|
double |
doubleValue()
Returns this DynamicObject as a double. |
|
Enum |
enumValue(Class targetClass)
Returns this DynamicObject as an Enum. |
|
boolean |
equals(Object obj)
Compares the specified object with this DynamicObject for equality. |
|
|
getArgument(String argumentName,
Class<T> argumentClass)
|
|
DynamicObject |
getElement(Object key)
Returns the element associated with the key if the DynamicObject represents a map. |
|
DynamicObject |
getElementAt(int index)
Returns the nth element if the DynamicObject represents an array. |
|
Class |
getElementType()
Returns element type if it's a list or a map, null otherwise. |
|
DynamicObject |
getField(String fieldName)
Returns the field value corresponding to the specified field name if the DynamicObject represents a Composite. |
|
Class |
getIndexType()
Returns index type if it's a list or a map, null otherwise. |
|
String |
getJavaClassName()
Returns the java class name of the object which represents this DynamicObject. |
|
Object |
getPrevious()
|
|
int |
hashCode()
|
|
Interval |
intervalValue()
Returns this DynamicObject as an Interval. |
|
int |
intValue()
Returns this DynamicObject as an int |
|
boolean |
isAssociativeArray()
Returns true if this DynamicObject represents a Map. |
|
boolean |
isBinary()
Returns true if this DynamicObject represents a Binary. |
|
boolean |
isBool()
Returns true if this DynamicObject represents a Bool. |
|
boolean |
isComposite()
Returns true if this DynamicObject represents a Composite Object. |
|
boolean |
isDecimal()
Returns true if this DynamicObject represents a Decimal. |
|
boolean |
isInt()
Returns true if this DynamicObject represents an Int. |
|
boolean |
isInterval()
Returns true if this DynamicObject represents a Interval. |
|
boolean |
isList()
Returns true if this DynamicObject represents a List. |
|
boolean |
isPredefined()
Returns true if this DynamicObject predefined. |
|
boolean |
isQuoted()
Returns true if this DynamicObject is quoted. |
|
boolean |
isReal()
Returns true if this DynamicObject represents a Real. |
|
boolean |
isString()
Returns true if this DynamicObject represents a String. |
|
boolean |
isTime()
Returns true if this DynamicObject represents a Time. |
|
long |
longValue()
Returns this DynamicObject as a long. |
|
Object |
objectValue()
Returns the Object that best represents this DynamicObject. |
|
DynamicObject.Quote |
quote()
Returns a new Quoted DynamicObject |
|
void |
removeElementAt(int index)
Removes the element at the specified position. |
|
abstract void |
serialize(fuego.lang.Serializer serializer)
Serialize this DynamicObject using the specified Serializer. |
|
void |
setArgument(String argumentName,
boolean value)
|
|
void |
setArgument(String argumentName,
byte value)
|
|
void |
setArgument(String argumentName,
char value)
|
|
void |
setArgument(String argumentName,
double value)
|
|
void |
setArgument(String argumentName,
float value)
|
|
void |
setArgument(String argumentName,
int value)
|
|
void |
setArgument(String argumentName,
long value)
|
|
void |
setArgument(String argumentName,
Object value)
|
|
void |
setArgument(String argumentName,
short value)
|
|
void |
setElement(Object key,
Object value)
Associates the specified value with the specified key. |
|
void |
setElementAt(int index,
Object value)
Replaces the element located at the specified index with the specified value. |
|
void |
setField(String fieldName,
boolean value)
Assigns a value to the specified field. |
|
void |
setField(String fieldName,
double value)
Assigns the specified value to the field. |
|
void |
setField(String fieldName,
long value)
Assigns the specified value to the field. |
|
void |
setField(String fieldName,
Object value)
Assigns a value to the specified field. |
|
void |
setFieldQ(String fieldName,
Object value)
Assigns a value to the specified field. |
|
void |
setJavaClassName(String classname)
Sets a java class name to this dynamic object. |
|
void |
setPrevious(Object previous)
|
|
Time |
timeValue()
Returns this DynamicObject as a Time. |
|
static DynamicObject |
valueOf(boolean value)
Returns the DynamicObject representation of the specified argument. |
|
static DynamicObject |
valueOf(double value)
Returns the DynamicObject representation of the specified argument. |
|
static DynamicObject |
valueOf(long value)
Returns the DynamicObject representation of the specified argument. |
|
static DynamicObject |
valueOf(Object value)
Returns the DynamicObject representation of the specified argument. |
|
static DynamicObject |
valueOf(Object value,
boolean quote)
|
|
static DynamicObject |
valueOf(Object value,
boolean quote,
Map<Object,Object> references)
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
@NonNls public static final String PARENT_REFERENCE_FIELD
public static final DynamicObject NULL
Constructor Detail |
---|
public DynamicObject()
Method Detail |
---|
public abstract void serialize(fuego.lang.Serializer serializer)
serializer
- public static DynamicObject create()
public static DynamicObject createList()
public static DynamicObject createMap()
public static DynamicObject defaultValueOf(Object value)
value
- Any object.
public static DynamicObject defaultValueOf(Object value, boolean quote)
public static DynamicObject defaultValueOf(Object value, boolean quote, Map<Object,Object> references)
public static DynamicObject valueOf(long value)
value
- A long value.
public static DynamicObject valueOf(double value)
value
- A double value.
public static DynamicObject valueOf(boolean value)
value
- A boolean value.
public static DynamicObject valueOf(Object value)
value
- An object value.
public static DynamicObject valueOf(Object value, boolean quote)
public static DynamicObject valueOf(Object value, boolean quote, Map<Object,Object> references)
public Object getPrevious()
public final void addElement(Object value) throws UnsupportedOperationException
value
- Value to add.
UnsupportedOperationException
public final void addElement(boolean value) throws UnsupportedOperationException
value
- Value to add.
UnsupportedOperationException
public final void addElement(long value) throws UnsupportedOperationException
value
- value to add.
UnsupportedOperationException
public final void addElement(double value) throws UnsupportedOperationException
value
- value to add.
UnsupportedOperationException
public final DynamicObject asDynamicObject()
asDynamicObject
in interface ArgumentMap
public Map<String,Object> asFieldsMap() throws UnsupportedOperationException
UnsupportedOperationException
public List<Object> asList() throws UnsupportedOperationException
UnsupportedOperationException
public final Map<String,Object> asMap() throws UnsupportedOperationException
asMap
in interface ArgumentMap
UnsupportedOperationException
public boolean booleanValue()
public final boolean contains(String argumentName)
contains
in interface ArgumentMap
public <T> T convertTo(Class<T> target)
public final Object convertTo(Field field)
field
- field type.
public <T> T convertTo(Class<T> target, Map<Object,Object> references)
target
-
public <T> T convertTo(Class<T> target, Class elementType, Map<Object,Object> references)
public void setPrevious(Object previous)
public BigDecimal decimalValue()
public double doubleValue()
public Enum enumValue(Class targetClass)
targetClass
-
public boolean equals(Object obj)
equals
in class Object
obj
-
public final <T> T getArgument(String argumentName, Class<T> argumentClass)
getArgument
in interface ArgumentMap
public DynamicObject getElement(Object key)
key
- key whose associated value is to be returned.
public DynamicObject getElementAt(int index)
index
- index of element to return
public Class getElementType()
public DynamicObject getField(String fieldName)
fieldName
- name of the field.
public final Class getIndexType()
public String getJavaClassName()
public int hashCode()
hashCode
in class Object
public Interval intervalValue()
public int intValue()
public boolean isBinary()
public boolean isBool()
public boolean isComposite()
public boolean isDecimal()
public boolean isInt()
public boolean isInterval()
public boolean isList()
public boolean isAssociativeArray()
public boolean isPredefined()
public final boolean isQuoted()
public boolean isReal()
public boolean isString()
public boolean isTime()
public long longValue()
public Object objectValue()
public final DynamicObject.Quote quote()
public final void removeElementAt(int index) throws UnsupportedOperationException
index
- Position.
UnsupportedOperationException
public final void setArgument(String argumentName, boolean value)
setArgument
in interface ArgumentMap
public final void setArgument(String argumentName, byte value)
setArgument
in interface ArgumentMap
public final void setArgument(String argumentName, char value)
setArgument
in interface ArgumentMap
public final void setArgument(String argumentName, short value)
setArgument
in interface ArgumentMap
public final void setArgument(String argumentName, int value)
setArgument
in interface ArgumentMap
public final void setArgument(String argumentName, long value)
setArgument
in interface ArgumentMap
public final void setArgument(String argumentName, float value)
setArgument
in interface ArgumentMap
public final void setArgument(String argumentName, double value)
setArgument
in interface ArgumentMap
public final void setArgument(String argumentName, Object value)
setArgument
in interface ArgumentMap
public void setElement(Object key, Object value) throws UnsupportedOperationException
key
- the key object.value
- the value associated to the key.
UnsupportedOperationException
public final void setElementAt(int index, Object value) throws UnsupportedOperationException
index
- position of the element to replace.value
- replacement of the element.
UnsupportedOperationException
public final void setField(String fieldName, Object value) throws UnsupportedOperationException
fieldName
- name of the field.value
- field value.
UnsupportedOperationException
public final void setField(String fieldName, boolean value) throws UnsupportedOperationException
fieldName
- name of the field.value
- field value.
UnsupportedOperationException
public final void setField(String fieldName, long value) throws UnsupportedOperationException
fieldName
- name of the fieldvalue
- field value.
UnsupportedOperationException
public final void setField(String fieldName, double value) throws UnsupportedOperationException
fieldName
- name of the field.value
- field value.
UnsupportedOperationException
public final void setFieldQ(String fieldName, Object value) throws UnsupportedOperationException
fieldName
- name of the field.value
- field value.
UnsupportedOperationException
public void setJavaClassName(String classname) throws UnsupportedOperationException
classname
- The java classname.
UnsupportedOperationException
- If it isn't a composite object.public Time timeValue()
public Map<DynamicObject,DynamicObject> asAssociativeArray() throws UnsupportedOperationException
UnsupportedOperationException
|
ALBPM Process API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |