org.restlet.engine.resource

## Class VariantInfo

- java.lang.Object
- - org.restlet.representation.Variant
  - - org.restlet.engine.resource.VariantInfo

    public class VariantInfo
    extends Variant

Variant that is declared by an annotated Java method.

Author:
  Jerome Louvel

### Constructor Summary

Constructors
Constructor and Description
`VariantInfo(MediaType mediaType)` Constructor.
`VariantInfo(MediaType mediaType, AnnotationInfo annotationInfo)` Constructor.
`VariantInfo(Variant variant, AnnotationInfo annotationInfo)` Constructor.

### Method Summary

Methods
`boolean` `equals(java.lang.Object other)` Indicates if the current variant is equal to the given variant.
`AnnotationInfo` `getAnnotationInfo()` Returns the optional annotation descriptor.

### Methods inherited from class org.restlet.representation.Variant

`createClientInfo, getCharacterSet, getEncodings, getIdentifier, getLanguages, getLocationRef, getMediaType, includes, isCompatible, setCharacterSet, setEncodings, setIdentifier, setIdentifier, setLanguages, setLocationRef, setLocationRef, setMediaType, toString`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### VariantInfo

    public VariantInfo(MediaType mediaType)

Constructor.

Parameters:
  `mediaType` - The media type.

#### VariantInfo

    public VariantInfo(MediaType mediaType,
               AnnotationInfo annotationInfo)

Constructor.

Parameters:
  `mediaType` - The media type.
  `annotationInfo` - The optional annotation descriptor.

#### VariantInfo

    public VariantInfo(Variant variant,
               AnnotationInfo 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 AnnotationInfo getAnnotationInfo()

Returns the optional annotation descriptor.

Returns:
  The optional annotation descriptor.