Class OverrideValue
java.lang.Object
org.simpleframework.xml.core.OverrideValue
- All Implemented Interfaces:
Value
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionOverrideValue(Value value, Class type) Constructor for theOverrideValueobject. -
Method Summary
Modifier and TypeMethodDescriptionintThis returns the length of the array that is to be allocated.getType()This is the type of the object instance this represents.getValue()This method is used to acquire an instance of the type that is defined by this object.booleanThis will return true if the object represents a reference.voidThis method is used set the value within this object.
-
Field Details
-
value
This is the value that is used internally for this value. -
type
This is the type that is used to represent the value.
-
-
Constructor Details
-
OverrideValue
Constructor for theOverrideValueobject. This will delegate to an internal value instance but will provide the declared type when requested.- Parameters:
value- this is the value that this will delegate totype- this is the override type for this value
-
-
Method Details
-
getValue
This method is used to acquire an instance of the type that is defined by this object. If the value has not been set then this method will return null if this is not a reference. -
setValue
This method is used set the value within this object. Once this is set then thegetValuemethod will return the object that has been provided for consistency. -
getType
This is the type of the object instance this represents. The type returned by this is used to instantiate an object which will be set on this value and the internal graph maintained. -
getLength
public int getLength()This returns the length of the array that is to be allocated. If this value does not represent an array then this should return zero to indicate that it is not an array object. -
isReference
public boolean isReference()This will return true if the object represents a reference. A reference will provide a valid instance when this objects getter is invoked. A valid instance can be a null.- Specified by:
isReferencein interfaceValue- Returns:
- this returns true if this represents a reference
-