public class XmlObjectDecoder extends Object implements ObjectDecoder
| Constructor and Description |
|---|
XmlObjectDecoder(Element node,
Class<?> expectedClass) |
| Modifier and Type | Method and Description |
|---|---|
int |
getNumSubObjects()
Returns the number of anonymous sub-objects.
|
boolean |
readBooleanContents()
Reads the value in-line.
|
boolean |
readBooleanField(String fieldName,
boolean dflt)
Reads a boolean.
|
byte[] |
readByteArrayContents()
reads the value in-line.
|
byte |
readByteContents()
reads the value in-line.
|
Class<?> |
readClassContents()
reads the value in-line.
|
Class<?> |
readClassField(String name,
Class<?> dflt)
Reads a Class.
|
double |
readDoubleContents()
reads the value in-line.
|
double |
readDoubleField(String fieldName,
double dflt)
Reads a double.
|
float |
readFloatContents()
Reads the value in-line.
|
float |
readFloatField(String fieldName,
float dflt)
Reads a float.
|
int |
readIntContents()
Reads the value in-line.
|
int |
readIntField(String fieldName,
int dflt)
Reads an int.
|
long |
readLongContents()
reads the value in-line.
|
long |
readLongField(String fieldName,
long dflt)
Reads a long.
|
Object |
readObject() |
Object |
readObjectContents(int index)
Reads a sub-object
|
Object |
readObjectField(String fieldName,
Class<?> expected,
Object dflt)
Reads an object using the appropriate serializer for that object
|
String |
readStringContents()
Reads the value in-line.
|
String |
readStringField(String fieldName,
String dflt)
Reads a String.
|
public Object readObject()
public boolean readBooleanContents()
ObjectDecoderreadBooleanContents in interface ObjectDecoderpublic boolean readBooleanField(String fieldName, boolean dflt)
ObjectDecoderreadBooleanField in interface ObjectDecoderfieldName - A hint of the field name. Ignored for binary
serialization. The attribute name for xml serializationpublic byte readByteContents()
ObjectDecoderreadByteContents in interface ObjectDecoderpublic byte[] readByteArrayContents()
ObjectDecoderreadByteArrayContents in interface ObjectDecoderpublic Class<?> readClassContents()
ObjectDecoderreadClassContents in interface ObjectDecoderpublic Class<?> readClassField(String name, Class<?> dflt)
ObjectDecoderreadClassField in interface ObjectDecodername - A hint of the field name. Ignored for binary
serialization. The attribute name for xml serializationpublic double readDoubleContents()
ObjectDecoderreadDoubleContents in interface ObjectDecoderpublic double readDoubleField(String fieldName, double dflt)
ObjectDecoderreadDoubleField in interface ObjectDecoderfieldName - A hint of the field name. Ignored for binary
serialization. The attribute name for xml serializationpublic float readFloatContents()
ObjectDecoderreadFloatContents in interface ObjectDecoderpublic float readFloatField(String fieldName, float dflt)
ObjectDecoderreadFloatField in interface ObjectDecoderfieldName - A hint of the field name. Ignored for binary
serialization. The attribute name for xml serializationpublic int readIntContents()
ObjectDecoderreadIntContents in interface ObjectDecoderpublic int readIntField(String fieldName, int dflt)
ObjectDecoderreadIntField in interface ObjectDecoderfieldName - A hint of the field name. Ignored for binary
serialization. The attribute name for xml serializationpublic long readLongContents()
ObjectDecoderreadLongContents in interface ObjectDecoderpublic long readLongField(String fieldName, long dflt)
ObjectDecoderreadLongField in interface ObjectDecoderfieldName - A hint of the field name. Ignored for binary
serialization. The attribute name for xml serializationpublic int getNumSubObjects()
ObjectDecodergetNumSubObjects in interface ObjectDecoderpublic Object readObjectContents(int index)
ObjectDecoderreadObjectContents in interface ObjectDecoderpublic Object readObjectField(String fieldName, Class<?> expected, Object dflt)
ObjectDecoderreadObjectField in interface ObjectDecoderfieldName - A hint of the field name. Ignored for binary
serialization. The subelement name for xml serializationpublic String readStringContents()
ObjectDecoderreadStringContents in interface ObjectDecoderpublic String readStringField(String fieldName, String dflt)
ObjectDecoderreadStringField in interface ObjectDecoderfieldName - A hint of the field name. Ignored for binary
serialization. The attribute name for xml serializationCopyright © 2022. All rights reserved.