Enum AnnotationTarget

java.lang.Object
java.lang.Enum<AnnotationTarget>
org.eclipse.yasson.internal.model.AnnotationTarget
All Implemented Interfaces:
Serializable, Comparable<AnnotationTarget>

public enum AnnotationTarget extends Enum<AnnotationTarget>
Represents the place in which a JSON annotation is applied. Some business functionalities are different based on whether annotation (e.g. JsonbTransient, JsonbNumberFormatter, etc .) is being applied on getter method, setter method or directly on the property.
  • Enum Constant Details

    • CLASS

      public static final AnnotationTarget CLASS
      Indicates annotation has been applied on class level.
    • PROPERTY

      public static final AnnotationTarget PROPERTY
      Indicates annotation has been applied on property level.
    • GETTER

      public static final AnnotationTarget GETTER
      Indicates annotation has been applied on the getter method of the property.
    • SETTER

      public static final AnnotationTarget SETTER
      Indicates annotation has been applied on the setter method of the property.
  • Constructor Details

    • AnnotationTarget

      private AnnotationTarget()
  • Method Details

    • values

      public static AnnotationTarget[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static AnnotationTarget valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null