@Target(value={ANNOTATION_TYPE,FIELD,METHOD,PARAMETER}) @Retention(value=RUNTIME) @Documented public @interface JsonPropertyEnumValues
JsonPropertyEnumValues
annotation is used to provide a set
of all possible values that are valid for the annotated object, primitive,
byte[]
, array, collection, or map property.
If annotating a property of type corresponding to a Java enum which is
serialize as a Json object instead of the standard string schema and using
the valueAvailablesOf()
or keyAvailablesOf()
with a class that
provides a method annotated with JsonPropertyEnumValuesProvider
which returns
a subset of enum values of this enum class. That set will be used as a filtered
set of enum values that can be passed into the method annotated using the
JsonPropertyEnumValuesProvider
or JsonPropertyDefaultValuesProvider
by Json properties of this enum class that are annotated with either the
JsonPropertyEnumValues
or JsonPropertyDefaultValues
annotations
referencing a class that has this annotated method.
Modifier and Type | Optional Element and Description |
---|---|
String[] |
key
Defines all possible values that are valid for the annotated property
contained keys.
|
Class<?>[] |
keyAvailablesOf
Defines all possible values that are valid for the annotated property
contained keys from the specified class' available values.
|
String[] |
keyExclude
Set of enum values to exclude from the schema for the annotated property
contained keys.
|
Class<?>[] |
keySubTypesOf
Defines all possible values that are valid for the annotated property
contained keys from the Json sub types of the specified class.
|
String[] |
value
Defines all possible values that are valid for the annotated property or
its contained values.
|
Class<?>[] |
valueAvailablesOf
Defines all possible values that are valid for the annotated property or
its contained values from the specified class' available values.
|
String[] |
valueExclude
Set of enum values to exclude from the schema for the annotated property or
its contained values.
|
Class<?>[] |
valueSubTypesOf
Defines all possible values that are valid for the annotated property or
its contained values from the Json sub types of the specified class.
|
public abstract String[] value
public abstract Class<?>[] valueSubTypesOf
Note: Only defined one class.
public abstract Class<?>[] valueAvailablesOf
Locale
, ZoneId
, and all enum classes.
Note: Only defined one class.
public abstract String[] valueExclude
public abstract String[] key
public abstract Class<?>[] keySubTypesOf
Note: Only defined one class.
public abstract Class<?>[] keyAvailablesOf
Locale
, ZoneId
, and all enum classes.
Note: Only defined one class.
public abstract String[] keyExclude
Copyright (C) 2015-2017 The Helenus Driver Project Authors.