Package io.avaje.jsonb
Annotation Type Json.SubType
- Enclosing class:
- Json
Specify the subtypes that a given type can be represented as.
This is used on an interface type, abstract type or type with inheritance to indicate all the concrete subtypes that can represent the type.
In the example below the abstract Vehicle type has 2 concrete subtypes of Car and Truck that can represent the type.
{@code
@Json
@Json.SubType(type = Car.class)
@Json.SubType(type = Truck.class, name = "TRUCK")
public abstract class Vehicle {
...
}</pre>-
Required Element Summary
Required Elements -
Optional Element Summary
Optional Elements
-
Element Details
-
type
The concrete type that extends or implements the base type.
-
-
-
name
The name or "discriminator value" that is used to identify the type.When unspecified this is the short name of the class.
- Default:
- ""
-