@JsonbAnnotation @Retention(value=RUNTIME) @Target(value={ANNOTATION_TYPE,TYPE}) public @interface JsonbTypeInfo
// Example
@JsonbTypeInfo(key = "@key")
interface Animal {}
class Dog implements Animal {}
class Cat implements Animal {}
This annotation is tightly bound to JsonbSubtype. It is required to use
JsonbSubtype annotations to specify all the possible classes and their aliases.| Modifier and Type | Fields and Description |
|---|---|
static java.lang.String |
DEFAULT_KEY_NAME
Default type information key name.
|
| Modifier and Type | Optional Element and Description |
|---|---|
java.lang.String |
key
Key used for keeping the type information (alias).
|
JsonbSubtype[] |
value
Allowed aliases of the handled type.
|
public static final java.lang.String DEFAULT_KEY_NAME
public abstract java.lang.String key
@type.public abstract JsonbSubtype[] value