Interface Extractor<T extends java.lang.annotation.Annotation>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      T[] getAnnotations()
      This is used to acquire each annotation that forms part of the union group.
      Label getLabel​(T label)
      This creates a Label object used to represent the annotation provided.
      java.lang.Class getType​(T label)
      Each annotation can provide a class which is used to determine which label is used to serialize an object.
    • Method Detail

      • getAnnotations

        T[] getAnnotations()
                    throws java.lang.Exception
        This is used to acquire each annotation that forms part of the union group. Extracting the annotations in this way allows the extractor to build a Label which can be used to represent the annotation. Each label can then provide a converter implementation to serialize objects.
        Returns:
        this returns each annotation within the union group
        Throws:
        java.lang.Exception
      • getType

        java.lang.Class getType​(T label)
                         throws java.lang.Exception
        Each annotation can provide a class which is used to determine which label is used to serialize an object. This ensures that the correct label is selected whenever serialization occurs.
        Parameters:
        label - this is the annotation to extract the type for
        Returns:
        this returns the class associated with the annotation
        Throws:
        java.lang.Exception
      • getLabel

        Label getLabel​(T label)
                throws java.lang.Exception
        This creates a Label object used to represent the annotation provided. Creating the label in this way ensures that each union has access to the serialization methods defined for each type an XML element name.
        Parameters:
        label - this is the annotation to create the label for
        Returns:
        this is the label created for the annotation
        Throws:
        java.lang.Exception