Interface ObjectValue
-
- All Superinterfaces:
java.io.Serializable,SerializableValue,TypedValue
- All Known Implementing Classes:
ObjectValueImpl
public interface ObjectValue extends SerializableValue
A typed value representing a Java Object.
- Since:
- 7.2
- Author:
- Daniel Meyer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Class<?>getObjectType()Returns the Class this object is an instance of.java.lang.StringgetObjectTypeName()A String representation of the Object's type name.java.lang.ObjectgetValue()Returns the Object or null in case the value is null.<T> TgetValue(java.lang.Class<T> type)Returns the object provided by this VariableValue.booleanisDeserialized()Returns true in case the object is deserialized.-
Methods inherited from interface org.camunda.bpm.engine.variable.value.SerializableValue
getSerializationDataFormat, getType, getValueSerialized
-
Methods inherited from interface org.camunda.bpm.engine.variable.value.TypedValue
isTransient
-
-
-
-
Method Detail
-
isDeserialized
boolean isDeserialized()
Returns true in case the object is deserialized. If this method returns true, it is safe to call the methods- Specified by:
isDeserializedin interfaceSerializableValue- Returns:
- true if the object is deserialized.
-
getValue
java.lang.Object getValue()
Returns the Object or null in case the value is null.- Specified by:
getValuein interfaceSerializableValue- Specified by:
getValuein interfaceTypedValue- Returns:
- the object represented by this TypedValue.
- Throws:
java.lang.IllegalStateException- in case the object is not deserialized. SeeisDeserialized().
-
getValue
<T> T getValue(java.lang.Class<T> type)
Returns the object provided by this VariableValue. Allows type-safe access to objects by passing in the class.- Parameters:
type- the java class the value should be cast to- Returns:
- the object represented by this TypedValue.
- Throws:
java.lang.IllegalStateException- in case the object is not deserialized. SeeisDeserialized().
-
getObjectType
java.lang.Class<?> getObjectType()
Returns the Class this object is an instance of.- Returns:
- the Class this object is an instance of
- Throws:
java.lang.IllegalStateException- in case the object is not deserialized. SeeisDeserialized().
-
getObjectTypeName
java.lang.String getObjectTypeName()
A String representation of the Object's type name. Usually the canonical class name of the Java Class this object is an instance of.- Returns:
- the Object's type name.
-
-