Class ExtractorFactory.ExtractorBuilder

  • Enclosing class:
    ExtractorFactory

    private static class ExtractorFactory.ExtractorBuilder
    extends java.lang.Object
    The ExtractorBuilder object is used to instantiate an extractor based an a particular union annotation. Each builder has a known constructor signature which can be used to reflectively instantiate the builder instance.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.Class label
      This is the union annotation to build the extractor for.
      private java.lang.Class type
      This is the actual extractor that is to be instantianted.
    • Constructor Summary

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private java.lang.reflect.Constructor getConstructor()
      Returns a Constructor that can be used to create an extractor based on a known constructor signature.
      • 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 union annotation to build the extractor for.
      • type

        private final java.lang.Class type
        This is the actual extractor that is to be instantianted.
    • Constructor Detail

      • ExtractorBuilder

        public ExtractorBuilder​(java.lang.Class label,
                                java.lang.Class type)
        Constructor for the ExtractorBuilder object. This requires the union annotation to instantiate the builder for. Also, the actual builder type is required.
        Parameters:
        label - this is the union annotation to be used
        type - this is the actual extractor implementation
    • Method Detail

      • getConstructor

        private java.lang.reflect.Constructor getConstructor()
                                                      throws java.lang.Exception
        Returns a Constructor that can be used to create an extractor based on a known constructor signature. The provided constructor is then used to instantiated the object.
        Returns:
        this returns the constructor for the extractor
        Throws:
        java.lang.Exception