Class ArrayValue
java.lang.Object
org.simpleframework.xml.strategy.ArrayValue
- All Implemented Interfaces:
Value
The
ArrayValue object is a value used for describing
arrays for a specified component type object. This provides the
component type for the array as well as the length of the array,
which allows the deserialization process to build a suitable length
array from the criteria taken from the XML element.- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintThis returns the length of the array that is to be allocated.getType()This will return the component type for the array instance that is described by this object.getValue()This is the instance that is acquired from this value.booleanThis will return false for the array value because the array is not a reference type.voidThis method is set the value so that future calls provide the value that was provided.
-
Field Details
-
value
This is the value that has been set within this value object. -
type
This is the optional field type for the array to be created. -
size
private int sizeThis is used to determine the size of the array to be created.
-
-
Constructor Details
-
ArrayValue
Constructor for theArrayValueobject. This will provide sufficient criteria to the deserialization process to instantiate an array of the specified size an type.- Parameters:
type- this is the component type for the arraysize- this is the size of the array to instantiate
-
-
Method Details
-
getValue
-
setValue
This method is set the value so that future calls provide the value that was provided. Setting the value ensures that the value used is consistent across invocations of this object. -
getType
This will return the component type for the array instance that is described by this object. This is used to ensure that an array with the correct component type can be instantiated. -
getLength
-
isReference
public boolean isReference()This will return false for the array value because the array is not a reference type. OnlyReferencevalues will have this set to true as they read from the graph.- Specified by:
isReferencein interfaceValue- Returns:
- this returns false as this is not a reference value
-