Class XmlObjectDecoder

    • Constructor Detail

      • XmlObjectDecoder

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

      • readObject

        public Object readObject()
      • readBooleanField

        public boolean readBooleanField​(String fieldName,
                                        boolean dflt)
        Description copied from interface: ObjectDecoder
        Reads a boolean.
        Specified by:
        readBooleanField in interface ObjectDecoder
        Parameters:
        fieldName - A hint of the field name. Ignored for binary serialization. The attribute name for xml serialization
      • readClassField

        public Class<?> readClassField​(String name,
                                       Class<?> dflt)
        Description copied from interface: ObjectDecoder
        Reads a Class.
        Specified by:
        readClassField in interface ObjectDecoder
        Parameters:
        name - A hint of the field name. Ignored for binary serialization. The attribute name for xml serialization
      • readDoubleField

        public double readDoubleField​(String fieldName,
                                      double dflt)
        Description copied from interface: ObjectDecoder
        Reads a double.
        Specified by:
        readDoubleField in interface ObjectDecoder
        Parameters:
        fieldName - A hint of the field name. Ignored for binary serialization. The attribute name for xml serialization
      • readFloatField

        public float readFloatField​(String fieldName,
                                    float dflt)
        Description copied from interface: ObjectDecoder
        Reads a float.
        Specified by:
        readFloatField in interface ObjectDecoder
        Parameters:
        fieldName - A hint of the field name. Ignored for binary serialization. The attribute name for xml serialization
      • readIntField

        public int readIntField​(String fieldName,
                                int dflt)
        Description copied from interface: ObjectDecoder
        Reads an int.
        Specified by:
        readIntField in interface ObjectDecoder
        Parameters:
        fieldName - A hint of the field name. Ignored for binary serialization. The attribute name for xml serialization
      • readLongField

        public long readLongField​(String fieldName,
                                  long dflt)
        Description copied from interface: ObjectDecoder
        Reads a long.
        Specified by:
        readLongField in interface ObjectDecoder
        Parameters:
        fieldName - A hint of the field name. Ignored for binary serialization. The attribute name for xml serialization
      • getNumSubObjects

        public int getNumSubObjects()
        Description copied from interface: ObjectDecoder
        Returns the number of anonymous sub-objects.
        Specified by:
        getNumSubObjects in interface ObjectDecoder
        Returns:
      • 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
        Parameters:
        fieldName - A hint of the field name. Ignored for binary serialization. The subelement name for xml serialization
      • readStringField

        public String readStringField​(String fieldName,
                                      String dflt)
        Description copied from interface: ObjectDecoder
        Reads a String.
        Specified by:
        readStringField in interface ObjectDecoder
        Parameters:
        fieldName - A hint of the field name. Ignored for binary serialization. The attribute name for xml serialization