Enum AnnotationTarget
- java.lang.Object
-
- java.lang.Enum<AnnotationTarget>
-
- org.eclipse.yasson.internal.model.AnnotationTarget
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<AnnotationTarget>
public enum AnnotationTarget extends java.lang.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 Summary
Enum Constants Enum Constant Description CLASS
Indicates annotation has been applied on class level.GETTER
Indicates annotation has been applied on the getter method of the property.PROPERTY
Indicates annotation has been applied on property level.SETTER
Indicates annotation has been applied on the setter method of the property.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static AnnotationTarget
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static AnnotationTarget[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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.
-
-
Method Detail
-
values
public static AnnotationTarget[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (AnnotationTarget c : AnnotationTarget.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AnnotationTarget valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-