org.identityconnectors.framework.impl.serializer.xml
Class XmlObjectDecoder

java.lang.Object
  extended by org.identityconnectors.framework.impl.serializer.xml.XmlObjectDecoder
All Implemented Interfaces:
ObjectDecoder

public class XmlObjectDecoder
extends Object
implements ObjectDecoder


Constructor Summary
XmlObjectDecoder(Element node, Class<?> expectedClass)
           
 
Method Summary
 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.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlObjectDecoder

public XmlObjectDecoder(Element node,
                        Class<?> expectedClass)
Method Detail

readObject

public Object readObject()

readBooleanContents

public boolean readBooleanContents()
Description copied from interface: ObjectDecoder
Reads the value in-line.

Specified by:
readBooleanContents in interface ObjectDecoder

readBooleanField

public boolean readBooleanField(String fieldName,
                                boolean dflt)
Description copied from interface: ObjectDecoder
Reads a boolean.

Specified by:
readBooleanField in interface ObjectDecoder

readByteArrayContents

public byte[] readByteArrayContents()
Description copied from interface: ObjectDecoder
reads the value in-line.

Specified by:
readByteArrayContents in interface ObjectDecoder

readClassContents

public Class<?> readClassContents()
Description copied from interface: ObjectDecoder
reads the value in-line.

Specified by:
readClassContents in interface ObjectDecoder

readClassField

public Class<?> readClassField(String name,
                               Class<?> dflt)
Description copied from interface: ObjectDecoder
Reads a Class.

Specified by:
readClassField in interface ObjectDecoder

readDoubleContents

public double readDoubleContents()
Description copied from interface: ObjectDecoder
reads the value in-line.

Specified by:
readDoubleContents in interface ObjectDecoder

readDoubleField

public double readDoubleField(String fieldName,
                              double dflt)
Description copied from interface: ObjectDecoder
Reads a double.

Specified by:
readDoubleField in interface ObjectDecoder

readFloatContents

public float readFloatContents()
Description copied from interface: ObjectDecoder
Reads the value in-line.

Specified by:
readFloatContents in interface ObjectDecoder

readFloatField

public float readFloatField(String fieldName,
                            float dflt)
Description copied from interface: ObjectDecoder
Reads a float.

Specified by:
readFloatField in interface ObjectDecoder

readIntContents

public int readIntContents()
Description copied from interface: ObjectDecoder
Reads the value in-line.

Specified by:
readIntContents in interface ObjectDecoder

readIntField

public int readIntField(String fieldName,
                        int dflt)
Description copied from interface: ObjectDecoder
Reads an int.

Specified by:
readIntField in interface ObjectDecoder

readLongContents

public long readLongContents()
Description copied from interface: ObjectDecoder
reads the value in-line.

Specified by:
readLongContents in interface ObjectDecoder

readLongField

public long readLongField(String fieldName,
                          long dflt)
Description copied from interface: ObjectDecoder
Reads a long.

Specified by:
readLongField in interface ObjectDecoder

getNumSubObjects

public int getNumSubObjects()
Description copied from interface: ObjectDecoder
Returns the number of anonymous sub-objects.

Specified by:
getNumSubObjects in interface ObjectDecoder
Returns:

readObjectContents

public Object readObjectContents(int index)
Description copied from interface: ObjectDecoder
Reads a sub-object

Specified by:
readObjectContents in interface ObjectDecoder

readObjectField

public Object readObjectField(String fieldName,
                              Class<?> expected,
                              Object dflt)
Description copied from interface: ObjectDecoder
Reads an object using the appropriate serializer for that object

Specified by:
readObjectField in interface ObjectDecoder

readStringContents

public String readStringContents()
Description copied from interface: ObjectDecoder
Reads the value in-line.

Specified by:
readStringContents in interface ObjectDecoder

readStringField

public String readStringField(String fieldName,
                              String dflt)
Description copied from interface: ObjectDecoder
Reads a String.

Specified by:
readStringField in interface ObjectDecoder


Copyright © 2011. All Rights Reserved.