Class AnnotationValue

    • Method Detail

      • numberValue

        public final Double numberValue()

        Value for a Number annotation.

        Returns:
        Value for a Number annotation.
      • booleanValue

        public final Boolean booleanValue()

        Value for a Boolean annotation.

        Returns:
        Value for a Boolean annotation.
      • stringValue

        public final String stringValue()

        Value for a String annotation.

        Returns:
        Value for a String annotation.
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • toString

        public final String toString()
        Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
        Overrides:
        toString in class Object
      • getValueForField

        public final <T> Optional<T> getValueForField​(String fieldName,
                                                      Class<T> clazz)
      • fromNumberValue

        public static AnnotationValue fromNumberValue​(Double numberValue)
        Create an instance of this class with numberValue() initialized to the given value.

        Value for a Number annotation.

        Parameters:
        numberValue - Value for a Number annotation.
      • fromBooleanValue

        public static AnnotationValue fromBooleanValue​(Boolean booleanValue)
        Create an instance of this class with booleanValue() initialized to the given value.

        Value for a Boolean annotation.

        Parameters:
        booleanValue - Value for a Boolean annotation.
      • fromStringValue

        public static AnnotationValue fromStringValue​(String stringValue)
        Create an instance of this class with stringValue() initialized to the given value.

        Value for a String annotation.

        Parameters:
        stringValue - Value for a String annotation.