Class ParameterFactory.ParameterBuilder

java.lang.Object
org.simpleframework.xml.core.ParameterFactory.ParameterBuilder
Enclosing class:
ParameterFactory

private static class ParameterFactory.ParameterBuilder extends Object
The ParameterBuilder is used to create a constructor that can be used to instantiate the correct parameter for the XML annotation specified. The constructor requires three arguments, the constructor, the annotation, and the index.
See Also:
  • Field Details

    • entry

      private final Class entry
      This is the entry that is used to create the parameter.
    • label

      private final Class label
      This is the XML annotation type within the constructor.
    • type

      private final Class type
      This is the parameter type that is to be instantiated.
  • Constructor Details

    • ParameterBuilder

      public ParameterBuilder(Class type, Class label)
      Constructor for the PameterBuilder object. This pairs the parameter type with the annotation argument used within the constructor. This allows constructor to be selected.
      Parameters:
      type - this is the parameter type to be instantiated
      label - the type that is used within the constructor
    • ParameterBuilder

      public ParameterBuilder(Class type, Class label, Class entry)
      Constructor for the PameterBuilder object. This pairs the parameter type with the annotation argument used within the constructor. This allows constructor to be selected.
      Parameters:
      type - this is the parameter type to be instantiated
      label - the type that is used within the constructor
      entry - this is the entry used to create the parameter
  • Method Details

    • getConstructor

      public Constructor getConstructor() throws Exception
      Creates the constructor used to instantiate the label for the XML annotation. The constructor returned will take two arguments, a contact and the XML annotation type.
      Returns:
      returns the constructor for the label object
      Throws:
      Exception
    • getConstructor

      public Constructor getConstructor(Class label) throws Exception
      Creates the constructor used to instantiate the parameter for the XML annotation. The constructor returned will take two arguments, a contact and the XML annotation type.
      Parameters:
      label - the type that is used within the constructor
      Returns:
      returns the constructor for the parameter object
      Throws:
      Exception
    • getConstructor

      public Constructor getConstructor(Class label, Class entry) throws Exception
      Creates the constructor used to instantiate the parameter for the XML annotation. The constructor returned will take two arguments, a contact and the XML annotation type.
      Parameters:
      label - the type that is used within the constructor
      entry - this is the entry used to create the parameter
      Returns:
      returns the constructor for the parameter object
      Throws:
      Exception
    • getConstructor

      private Constructor getConstructor(Class... types) throws Exception
      Creates the constructor used to instantiate the parameter for the XML annotation. The constructor returned will take three arguments, a constructor, an annotation and a type.
      Parameters:
      types - these are the arguments for the constructor
      Returns:
      returns the constructor for the parameter object
      Throws:
      Exception