Class ParameterFactory.ParameterBuilder

  • Enclosing class:
    ParameterFactory

    private static class ParameterFactory.ParameterBuilder
    extends java.lang.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:
    Constructor
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.Class entry
      This is the entry that is used to create the parameter.
      private java.lang.Class label
      This is the XML annotation type within the constructor.
      private java.lang.Class type
      This is the parameter type that is to be instantiated.
    • Constructor Summary

      Constructors 
      Constructor Description
      ParameterBuilder​(java.lang.Class type, java.lang.Class label)
      Constructor for the PameterBuilder object.
      ParameterBuilder​(java.lang.Class type, java.lang.Class label, java.lang.Class entry)
      Constructor for the PameterBuilder object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.reflect.Constructor getConstructor()
      Creates the constructor used to instantiate the label for the XML annotation.
      java.lang.reflect.Constructor getConstructor​(java.lang.Class label)
      Creates the constructor used to instantiate the parameter for the XML annotation.
      private java.lang.reflect.Constructor getConstructor​(java.lang.Class... types)
      Creates the constructor used to instantiate the parameter for the XML annotation.
      java.lang.reflect.Constructor getConstructor​(java.lang.Class label, java.lang.Class entry)
      Creates the constructor used to instantiate the parameter for the XML annotation.
      • Methods inherited from class java.lang.Object

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

      • entry

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

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

        private final java.lang.Class type
        This is the parameter type that is to be instantiated.
    • Constructor Detail

      • ParameterBuilder

        public ParameterBuilder​(java.lang.Class type,
                                java.lang.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​(java.lang.Class type,
                                java.lang.Class label,
                                java.lang.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 Detail

      • getConstructor

        public java.lang.reflect.Constructor getConstructor()
                                                     throws java.lang.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:
        java.lang.Exception
      • getConstructor

        public java.lang.reflect.Constructor getConstructor​(java.lang.Class label)
                                                     throws java.lang.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:
        java.lang.Exception
      • getConstructor

        public java.lang.reflect.Constructor getConstructor​(java.lang.Class label,
                                                            java.lang.Class entry)
                                                     throws java.lang.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:
        java.lang.Exception
      • getConstructor

        private java.lang.reflect.Constructor getConstructor​(java.lang.Class... types)
                                                      throws java.lang.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:
        java.lang.Exception