Class XAnnotationField<T>

java.lang.Object
org.jvnet.basicjaxb_annox.model.annotation.field.XAnnotationField<T>
Type Parameters:
T - Type of the field.
Direct Known Subclasses:
XArrayAnnotationField, XSingleAnnotationField

public abstract class XAnnotationField<T> extends Object
Defines an annotation field.
Author:
Aleksei Valikov
  • Constructor Details

    • XAnnotationField

      public XAnnotationField(String name)
      Constructrs an annotation field with the given name.
      Parameters:
      name - name of the field.
  • Method Details

    • getName

      public String getName()
      Returns the name of the field.
      Returns:
      Name of the field.
    • getValue

      public abstract T getValue()
      Returns the value of the field.
      Returns:
      Value of the field.
    • getInternalValue

      protected final Object getInternalValue()
      Returns the internal value of the field used for Object.hashCode(), Object.equals(Object) and Object.toString() operations. Defaults to the value of the field.
      Returns:
      Returns the value of the field.
    • getResult

      public Object getResult()
      Returns the result value of the field. By default, returns the value of the field.
      Returns:
      Result value of the field.
    • getType

      public abstract Class<?> getType()
      Return the type of the field.
      Returns:
      Type of the field.
    • accept

      public abstract <P> P accept(XAnnotationFieldVisitor<P> visitor)
      Accepts the annotation visitor.
      Type Parameters:
      P - Return type of the visitor.
      Parameters:
      visitor - visitor to accept.
      Returns:
      Result of the visit.