Package com.google.api.client.json
Annotation Type JsonPolymorphicTypeMap
-
@Target(FIELD) @Retention(RUNTIME) @Beta public @interface JsonPolymorphicTypeMap
Beta
Declares that the data type enclosing this field is polymorphic, and that the value of this field in a heterogeneous JSON schema will determine what type the data should be parsed into.A data structure must have no more than one field with this annotation present. The annotated field's type must be considered "primitive" by
Data.isPrimitive(Type)
. The field's value will be compared against theJsonPolymorphicTypeMap.TypeDef.key()
usingObject.toString()
.- Since:
- 1.16
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description JsonPolymorphicTypeMap.TypeDef[]
typeDefinitions
The list of mappings from key value to a referencedClass
.
-
-
-
Element Detail
-
typeDefinitions
JsonPolymorphicTypeMap.TypeDef[] typeDefinitions
The list of mappings from key value to a referencedClass
.
-
-