Class AnnotationValue.EnumValue

    • Field Detail

      • value

        private final java.lang.String value
      • typeName

        private final DotName typeName
    • Constructor Detail

      • EnumValue

        EnumValue​(java.lang.String name,
                  DotName typeName,
                  java.lang.String value)
    • Method Detail

      • value

        public java.lang.String value()
        Description copied from class: AnnotationValue
        Returns a detyped value that represents the underlying annotation value. It is recommended that the type specific methods be used instead.
        Specified by:
        value in class AnnotationValue
        Returns:
        the underlying value
      • kind

        public AnnotationValue.Kind kind()
        Description copied from class: AnnotationValue
        Returns the kind of this value. The kind includes all Java primitives, String and Enum types, nested values, and finally arrays of the above. Since the return type is itself an enumeration, it can be used with Java switch statements.

        A special AnnotationValue.Kind.UNKNOWN kind is used to refer to components of zero-length arrays, as the underlying type is not known.

        Specified by:
        kind in class AnnotationValue
        Returns:
        the kind of value
      • asEnum

        public java.lang.String asEnum()
        Description copied from class: AnnotationValue
        Returns the constant name, in string form, that represents the Java enumeration of this value. The value is the same as the one returned by Enum.name().
        Overrides:
        asEnum in class AnnotationValue
        Returns:
        the string name of a Java enumeration
      • asEnumType

        public DotName asEnumType()
        Description copied from class: AnnotationValue
        Returns the type name, in DotName form, that represents the Java enumeration of this value. The value is the same as the one returned by Object.getClass().
        Overrides:
        asEnumType in class AnnotationValue
        Returns:
        the type name of a Java enumeration
      • equals

        public boolean equals​(java.lang.Object o)
        Description copied from class: AnnotationValue
        Compares this annotation value to another annotation value, and returns true if equal.
        Overrides:
        equals in class AnnotationValue
        Parameters:
        o - the annotation value to compare to.
        Returns:
        true if equal, false if not
        See Also:
        Object.equals(Object)
      • hashCode

        public int hashCode()
        Description copied from class: AnnotationValue
        Computes a hash code for this annotation value.
        Overrides:
        hashCode in class AnnotationValue
        Returns:
        the hash code for this annotation value
        See Also:
        Object.hashCode()