Package jakarta.json.bind.annotation
Annotation Type JsonbCreator
-
@JsonbAnnotation @Retention(RUNTIME) @Target({ANNOTATION_TYPE,METHOD,CONSTRUCTOR}) public @interface JsonbCreator
This annotation identifies the custom constructor or factory method to use when creating an instance of the associated class.
Only one constructor or static factory method can be annotated with
JsonbCreatorin a given class.The
@JsonbCreatorannotation is intended to be used with constructors/methods with parameters. Such parameters could be annotated for instance with@JsonbProperty.Usage
The
@JsonbCreatorannotation can be used with the following program elements:- method
- constructor
- Since:
- JSON Binding 1.0