Interface AnnotationValue

All Superinterfaces:
ClassfileElement, WritableElement<AnnotationValue>
All Known Subinterfaces:
AnnotationImpl.OfConstantImpl, AnnotationValue.OfAnnotation, AnnotationValue.OfArray, AnnotationValue.OfBoolean, AnnotationValue.OfByte, AnnotationValue.OfCharacter, AnnotationValue.OfClass, AnnotationValue.OfConstant, AnnotationValue.OfDouble, AnnotationValue.OfEnum, AnnotationValue.OfFloat, AnnotationValue.OfInteger, AnnotationValue.OfLong, AnnotationValue.OfShort, AnnotationValue.OfString
All Known Implementing Classes:
AnnotationImpl.OfAnnotationImpl, AnnotationImpl.OfArrayImpl, AnnotationImpl.OfBooleanImpl, AnnotationImpl.OfByteImpl, AnnotationImpl.OfCharacterImpl, AnnotationImpl.OfClassImpl, AnnotationImpl.OfDoubleImpl, AnnotationImpl.OfEnumImpl, AnnotationImpl.OfFloatImpl, AnnotationImpl.OfIntegerImpl, AnnotationImpl.OfLongImpl, AnnotationImpl.OfShortImpl, AnnotationImpl.OfStringImpl

Models the value of a key-value pair of an annotation.
See Also:
  • Method Details

    • tag

      char tag()
      Returns:
      the tag character for this type as per
    • ofEnum

      static AnnotationValue.OfEnum ofEnum(Utf8Entry className, Utf8Entry constantName)
      Returns an annotation element for a enum-valued element.
      Parameters:
      className - the name of the enum class
      constantName - the name of the enum constant
      Returns:
      an annotation element for a enum-valued element
    • ofEnum

      static AnnotationValue.OfEnum ofEnum(ClassDesc className, String constantName)
      Returns an annotation element for a enum-valued element.
      Parameters:
      className - the name of the enum class
      constantName - the name of the enum constant
      Returns:
      an annotation element for a enum-valued element
    • ofClass

      static AnnotationValue.OfClass ofClass(Utf8Entry className)
      Returns an annotation element for a class-valued element.
      Parameters:
      className - the name of the enum class
      Returns:
      an annotation element for a class-valued element
    • ofClass

      static AnnotationValue.OfClass ofClass(ClassDesc className)
      Returns an annotation element for a class-valued element.
      Parameters:
      className - the name of the enum class
      Returns:
      an annotation element for a class-valued element
    • ofString

      static AnnotationValue.OfConstant ofString(Utf8Entry value)
      Returns an annotation element for a string-valued element.
      Parameters:
      value - the string
      Returns:
      an annotation element for a string-valued element
    • ofString

      static AnnotationValue.OfConstant ofString(String value)
      Returns an annotation element for a string-valued element.
      Parameters:
      value - the string
      Returns:
      an annotation element for a string-valued element
    • ofDouble

      static AnnotationValue.OfConstant ofDouble(DoubleEntry value)
      Returns an annotation element for a double-valued element.
      Parameters:
      value - the double value
      Returns:
      an annotation element for a double-valued element
    • ofDouble

      static AnnotationValue.OfConstant ofDouble(double value)
      Returns an annotation element for a double-valued element.
      Parameters:
      value - the double value
      Returns:
      an annotation element for a double-valued element
    • ofFloat

      static AnnotationValue.OfConstant ofFloat(FloatEntry value)
      Returns an annotation element for a float-valued element.
      Parameters:
      value - the float value
      Returns:
      an annotation element for a float-valued element
    • ofFloat

      static AnnotationValue.OfConstant ofFloat(float value)
      Returns an annotation element for a float-valued element.
      Parameters:
      value - the float value
      Returns:
      an annotation element for a float-valued element
    • ofLong

      static AnnotationValue.OfConstant ofLong(LongEntry value)
      Returns an annotation element for a long-valued element.
      Parameters:
      value - the long value
      Returns:
      an annotation element for a long-valued element
    • ofLong

      static AnnotationValue.OfConstant ofLong(long value)
      Returns an annotation element for a long-valued element.
      Parameters:
      value - the long value
      Returns:
      an annotation element for a long-valued element
    • ofInt

      Returns an annotation element for an int-valued element.
      Parameters:
      value - the int value
      Returns:
      an annotation element for an int-valued element
    • ofInt

      static AnnotationValue.OfConstant ofInt(int value)
      Returns an annotation element for an int-valued element.
      Parameters:
      value - the int value
      Returns:
      an annotation element for an int-valued element
    • ofShort

      static AnnotationValue.OfConstant ofShort(IntegerEntry value)
      Returns an annotation element for a short-valued element.
      Parameters:
      value - the short value
      Returns:
      an annotation element for a short-valued element
    • ofShort

      static AnnotationValue.OfConstant ofShort(short value)
      Returns an annotation element for a short-valued element.
      Parameters:
      value - the short value
      Returns:
      an annotation element for a short-valued element
    • ofChar

      Returns an annotation element for a char-valued element.
      Parameters:
      value - the char value
      Returns:
      an annotation element for a char-valued element
    • ofChar

      static AnnotationValue.OfConstant ofChar(char value)
      Returns an annotation element for a char-valued element.
      Parameters:
      value - the char value
      Returns:
      an annotation element for a char-valued element
    • ofByte

      Returns an annotation element for a byte-valued element.
      Parameters:
      value - the byte value
      Returns:
      an annotation element for a byte-valued element
    • ofByte

      static AnnotationValue.OfConstant ofByte(byte value)
      Returns an annotation element for a byte-valued element.
      Parameters:
      value - the byte value
      Returns:
      an annotation element for a byte-valued element
    • ofBoolean

      static AnnotationValue.OfConstant ofBoolean(IntegerEntry value)
      Returns an annotation element for a boolean-valued element.
      Parameters:
      value - the boolean value
      Returns:
      an annotation element for a boolean-valued element
    • ofBoolean

      static AnnotationValue.OfConstant ofBoolean(boolean value)
      Returns an annotation element for a boolean-valued element.
      Parameters:
      value - the boolean value
      Returns:
      an annotation element for a boolean-valued element
    • ofAnnotation

      static AnnotationValue.OfAnnotation ofAnnotation(Annotation value)
      Returns an annotation element for an annotation-valued element.
      Parameters:
      value - the annotation
      Returns:
      an annotation element for an annotation-valued element
    • ofArray

      static AnnotationValue.OfArray ofArray(List<AnnotationValue> values)
      Returns an annotation element for an array-valued element.
      Parameters:
      values - the values
      Returns:
      an annotation element for an array-valued element
    • ofArray

      static AnnotationValue.OfArray ofArray(AnnotationValue... values)
      Returns an annotation element for an array-valued element.
      Parameters:
      values - the values
      Returns:
      an annotation element for an array-valued element
    • of

      static AnnotationValue of(Object value)
      Returns an annotation element. The value parameter must be a primitive, a String, a ClassDesc, an enum constant, or an array of one of these.
      Parameters:
      value - the annotation value
      Returns:
      an annotation element