Class LabelExtractor.LabelBuilder

  • Enclosing class:
    LabelExtractor

    private static class LabelExtractor.LabelBuilder
    extends java.lang.Object
    The LabelBuilder object will create a constructor that can be used to instantiate the correct label for the XML annotation specified. The constructor requires two arguments a Contact and the specified XML annotation.
    See Also:
    Constructor
    • Field Summary

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

      Constructors 
      Constructor Description
      LabelBuilder​(java.lang.Class type, java.lang.Class label)
      Constructor for the LabelBuilder object.
      LabelBuilder​(java.lang.Class type, java.lang.Class label, java.lang.Class entry)
      Constructor for the LabelBuilder 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.
      private java.lang.reflect.Constructor getConstructor​(java.lang.Class label)
      Creates the constructor used to instantiate the label for the XML annotation.
      private java.lang.reflect.Constructor getConstructor​(java.lang.Class label, java.lang.Class entry)
      Creates the constructor used to instantiate the label for the XML annotation.
      • Methods inherited from class java.lang.Object

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

      • label

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

        private final java.lang.Class entry
        This is the individual entry annotation used for the label.
      • type

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

      • LabelBuilder

        public LabelBuilder​(java.lang.Class type,
                            java.lang.Class label)
        Constructor for the LabelBuilder object. This pairs the label type with the XML annotation argument used within the constructor. This create the constructor.
        Parameters:
        type - this is the label type to be instantiated
        label - type that is used within the constructor
      • LabelBuilder

        public LabelBuilder​(java.lang.Class type,
                            java.lang.Class label,
                            java.lang.Class entry)
        Constructor for the LabelBuilder object. This pairs the label type with the XML annotation argument used within the constructor. This will create the constructor.
        Parameters:
        type - this is the label type to be instantiated
        label - type that is used within the constructor
        entry - entry that is used within the constructor
    • 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

        private java.lang.reflect.Constructor getConstructor​(java.lang.Class label)
                                                      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

        private java.lang.reflect.Constructor getConstructor​(java.lang.Class label,
                                                             java.lang.Class entry)
                                                      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.
        Parameters:
        label - this is the XML annotation argument type used
        entry - this is the entry type to use for the label
        Returns:
        returns the constructor for the label object
        Throws:
        java.lang.Exception