@Target(value=METHOD) @Retention(value=RUNTIME) @Documented public @interface JsonPropertyDefaultValuesProvider
JsonPropertyDefaultValuesProvider
annotation is used to annotated
a static method in a class which is able to provide the set of valid default values
for a Json property annotated with JsonPropertyDefaultValues
and defining
a class using the JsonPropertyDefaultValues.valueFromClass()
.
The referenced method must be public and static. It can return an array, a
Collection
, an Iterable
, an Iterator
, an
Enumeration
, or a Stream
of objects or a single object.
The string representation of each returned object will be used as a possible
default value for the Json property.
If the method is used to in association with an enum class, it is possible to
have it accept one argument of type array of that enum and annotate the property
that references this enum class with a JsonPropertyEnumValues
annotation
that uses the JsonPropertyEnumValues.valueAvailablesOf()
or
JsonPropertyEnumValues.keyAvailablesOf()
with a class that provides a
method annotated with @JsonPropertyEnumValuesProvider
which returns
a subset of enum values that would then be passed in argument here.
Copyright (C) 2015-2017 The Helenus Driver Project Authors.