Class Annotation

java.lang.Object
org.robovm.rt.annotation.Annotation
All Implemented Interfaces:
Annotation

public abstract class Annotation
extends Object
implements Annotation
Abstract base class of annotation implementation classes generated by the compiler AnnotationImplPlugin.
  • Field Details

    • NO_VALUE

      protected static final Object NO_VALUE
      Singleton representing missing element value.
  • Constructor Details

  • Method Details

    • annotationType

      public Class<? extends Annotation> annotationType()
      Description copied from interface: Annotation
      Returns the type of this annotation.
      Specified by:
      annotationType in interface Annotation
      Returns:
      A Class instance representing the annotation type.
    • validate

      protected final Object validate​(Object value, String memberName)
    • getDefaultValue

      protected final Object getDefaultValue​(String memberName)
    • hash

      protected final int hash​(Object value, String memberName)
    • equals

      public final boolean equals​(Object o)
      Description copied from class: Object
      Compares this instance with the specified object and indicates if they are equal. In order to be equal, o must represent the same object as this instance using a class-specific comparison. The general contract is that this comparison should be reflexive, symmetric, and transitive. Also, no object reference other than null is equal to null.

      The default implementation returns true only if this == o. See Writing a correct equals method if you intend implementing your own equals method.

      The general contract for the equals and Object.hashCode() methods is that if equals returns true for any two objects, then hashCode() must return the same value for these objects. This means that subclasses of Object usually override either both methods or neither of them.

      Specified by:
      equals in interface Annotation
      Overrides:
      equals in class Object
      Parameters:
      o - the object to compare this instance with.
      Returns:
      true if the specified object is equal to this Object; false otherwise.
      See Also:
      Object.hashCode()
    • fastEquals

      protected abstract boolean fastEquals​(Object that)
    • slowEquals

      protected abstract boolean slowEquals​(Object that)
    • memberEquals

      protected final boolean memberEquals​(Object ours, Object theirs)
    • toString

      public final String toString()
      Description copied from class: Object
      Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:
         getClass().getName() + '@' + Integer.toHexString(hashCode())

      See Writing a useful toString method if you intend implementing your own toString method.

      Specified by:
      toString in interface Annotation
      Overrides:
      toString in class Object
      Returns:
      a printable representation of this object.
    • membersToString

      protected abstract void membersToString​(StringBuilder sb)
    • memberToString

      protected final void memberToString​(StringBuilder sb, Object value, String memberName, boolean first)
    • box

      protected static Boolean box​(boolean v)
    • box

      protected static Byte box​(byte v)
    • box

      protected static Short box​(short v)
    • box

      protected static Character box​(char v)
    • box

      protected static Integer box​(int v)
    • box

      protected static Long box​(long v)
    • box

      protected static Float box​(float v)
    • box

      protected static Double box​(double v)
    • unbox

      protected static boolean unbox​(Boolean v)
    • unbox

      protected static byte unbox​(Byte v)
    • unbox

      protected static short unbox​(Short v)
    • unbox

      protected static char unbox​(Character v)
    • unbox

      protected static int unbox​(Integer v)
    • unbox

      protected static long unbox​(Long v)
    • unbox

      protected static float unbox​(Float v)
    • unbox

      protected static double unbox​(Double v)