Class Composite.Builder

java.lang.Object
org.simpleframework.xml.core.Composite.Builder
Direct Known Subclasses:
Composite.Injector
Enclosing class:
Composite

private static class Composite.Builder extends Object
This takes the approach that the object is instantiated first and then the annotated fields and methods are deserialized from the XML elements and attributes. When all the details have be read they are set on the internal contacts of the object. This is used for places where we have a default no argument constructor.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final Composite
    This is the composite converter that the builder will use.
    protected final Criteria
    This is the criteria object used to collect the values.
    protected final Schema
    This is the schema object that contains the XML definition.
    protected final Instance
    This is the object instance created by the strategy object.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Builder(Composite composite, Criteria criteria, Schema schema, Instance value)
    Constructor for the Builder object.
  • Method Summary

    Modifier and Type
    Method
    Description
    This read method performs deserialization of the XML schema class type by traversing the contacts and using details from the provided XML element.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • composite

      protected final Composite composite
      This is the composite converter that the builder will use.
    • criteria

      protected final Criteria criteria
      This is the criteria object used to collect the values.
    • schema

      protected final Schema schema
      This is the schema object that contains the XML definition.
    • value

      protected final Instance value
      This is the object instance created by the strategy object.
  • Constructor Details

    • Builder

      public Builder(Composite composite, Criteria criteria, Schema schema, Instance value)
      Constructor for the Builder object. This creates a builder object capable of instantiating a object using a default no argument constructor. All fields are deserialized after the object has been instantiated.
      Parameters:
      composite - this is the composite object used by this
      criteria - this collects the objects being deserialized
      schema - this is the class schema used by this
      value - this is the instance created by the strategy
  • Method Details

    • read

      public Object read(InputNode node) throws Exception
      This read method performs deserialization of the XML schema class type by traversing the contacts and using details from the provided XML element. Here an instance is created first then the contacts are traversed, this is done when a default constructor is the only option.
      Parameters:
      node - the XML element that will be deserialized by this
      Returns:
      this returns the fully deserialized object graph
      Throws:
      Exception