Class VariantInfo


  • public class VariantInfo
    extends Variant
    Variant that is declared by an annotated Java method.
    • Field Detail

      • annotationInfo

        private final MethodAnnotationInfo annotationInfo
        The optional annotation descriptor.
      • inputScore

        private float inputScore
        Affinity between this variant and an incoming representation.
    • Constructor Detail

      • VariantInfo

        public VariantInfo​(MediaType mediaType)
        Constructor.
        Parameters:
        mediaType - The media type.
      • VariantInfo

        public VariantInfo​(MediaType mediaType,
                           MethodAnnotationInfo annotationInfo)
        Constructor.
        Parameters:
        mediaType - The media type.
        annotationInfo - The optional annotation descriptor.
      • VariantInfo

        public VariantInfo​(Variant variant,
                           MethodAnnotationInfo annotationInfo)
        Constructor.
        Parameters:
        variant - The variant to enrich.
        annotationInfo - The optional annotation descriptor.
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object other)
        Indicates if the current variant is equal to the given variant.
        Overrides:
        equals in class Variant
        Parameters:
        other - The other variant.
        Returns:
        True if the current variant includes the other.
      • getAnnotationInfo

        public MethodAnnotationInfo getAnnotationInfo()
        Returns the optional annotation descriptor.
        Returns:
        The optional annotation descriptor.
      • getInputScore

        public float getInputScore()
        Returns the affinity between this variant and an incoming representation.
        Returns:
        The affinity between this variant and an incoming representation.
      • setInputScore

        public void setInputScore​(float inputScore)
        Sets the affinity between this variant and an incoming representation.
        Parameters:
        inputScore - The affinity between this variant and an incoming representation.