public class Jsonb1Annotator extends AbstractAnnotator
| Constructor and Description |
|---|
Jsonb1Annotator(GenerationConfig generationConfig) |
| Modifier and Type | Method and Description |
|---|---|
void |
additionalPropertiesField(com.sun.codemodel.JFieldVar field,
com.sun.codemodel.JDefinedClass clazz,
String propertyName) |
void |
dateField(com.sun.codemodel.JFieldVar field,
com.sun.codemodel.JDefinedClass clazz,
com.fasterxml.jackson.databind.JsonNode node)
Add the necessary annotations to a date field.
|
void |
dateTimeField(com.sun.codemodel.JFieldVar field,
com.sun.codemodel.JDefinedClass clazz,
com.fasterxml.jackson.databind.JsonNode node)
Add the necessary annotations to a date-time field.
|
boolean |
isAdditionalPropertiesSupported()
Indicates whether the annotation style that this annotator uses can
support the JSON Schema 'additionalProperties' feature.
|
void |
propertyField(com.sun.codemodel.JFieldVar field,
com.sun.codemodel.JDefinedClass clazz,
String propertyName,
com.fasterxml.jackson.databind.JsonNode propertyNode)
Add the necessary annotation to mark a Java field as a JSON property
|
void |
propertyGetter(com.sun.codemodel.JMethod getter,
com.sun.codemodel.JDefinedClass clazz,
String propertyName)
Add the necessary annotation to mark a Java method as the getter for a
JSON property
|
void |
propertyOrder(com.sun.codemodel.JDefinedClass clazz,
com.fasterxml.jackson.databind.JsonNode propertiesNode)
Add the necessary annotation to dictate correct property order during
serialization
|
void |
propertySetter(com.sun.codemodel.JMethod setter,
com.sun.codemodel.JDefinedClass clazz,
String propertyName)
Add the necessary annotation to mark a Java method as the setter for a
JSON property
|
void |
timeField(com.sun.codemodel.JFieldVar field,
com.sun.codemodel.JDefinedClass clazz,
com.fasterxml.jackson.databind.JsonNode node)
Add the necessary annotations to a time field.
|
anyGetter, anySetter, enumConstant, enumCreatorMethod, enumValueMethod, getGenerationConfig, isPolymorphicDeserializationSupported, propertyInclusion, typeInfopublic Jsonb1Annotator(GenerationConfig generationConfig)
public void propertyOrder(com.sun.codemodel.JDefinedClass clazz,
com.fasterxml.jackson.databind.JsonNode propertiesNode)
AnnotatorpropertyOrder in interface AnnotatorpropertyOrder in class AbstractAnnotatorclazz - a generated pojo class, that is serialized to JSONpropertiesNode - the properties to be orderedpublic void propertyField(com.sun.codemodel.JFieldVar field,
com.sun.codemodel.JDefinedClass clazz,
String propertyName,
com.fasterxml.jackson.databind.JsonNode propertyNode)
AnnotatorpropertyField in interface AnnotatorpropertyField in class AbstractAnnotatorfield - the field that contains data that will be serializedclazz - the owner of the field (class to which the field belongs)propertyName - the name of the JSON property that this field representspropertyNode - the schema node defining this propertypublic void propertyGetter(com.sun.codemodel.JMethod getter,
com.sun.codemodel.JDefinedClass clazz,
String propertyName)
AnnotatorpropertyGetter in interface AnnotatorpropertyGetter in class AbstractAnnotatorgetter - the method that will be used to get the value of the given
JSON propertypropertyName - the name of the JSON property that this getter getspublic void propertySetter(com.sun.codemodel.JMethod setter,
com.sun.codemodel.JDefinedClass clazz,
String propertyName)
AnnotatorpropertySetter in interface AnnotatorpropertySetter in class AbstractAnnotatorsetter - the method that will be used to set the value of the given
JSON propertypropertyName - the name of the JSON property that this setter setspublic boolean isAdditionalPropertiesSupported()
Annotator
Jackson is able to use it's JsonAnyGetter and
JsonAnySetter features for this purpose, hence for Jackson
annotators, this method will return true. Gson does not
support 'additional' property values (they are silently discarded at
deserialization time), hence for Gson annotators, this method would
return false. Moshi 1.x behaves similar to Gson and therefore
returns false.
isAdditionalPropertiesSupported in interface AnnotatorisAdditionalPropertiesSupported in class AbstractAnnotatorpublic void additionalPropertiesField(com.sun.codemodel.JFieldVar field,
com.sun.codemodel.JDefinedClass clazz,
String propertyName)
additionalPropertiesField in interface AnnotatoradditionalPropertiesField in class AbstractAnnotatorpublic void dateField(com.sun.codemodel.JFieldVar field,
com.sun.codemodel.JDefinedClass clazz,
com.fasterxml.jackson.databind.JsonNode node)
AnnotatordateField in interface AnnotatordateField in class AbstractAnnotatorfield - the field that contains data that will be serializednode - the schema node defining this propertypublic void timeField(com.sun.codemodel.JFieldVar field,
com.sun.codemodel.JDefinedClass clazz,
com.fasterxml.jackson.databind.JsonNode node)
AnnotatortimeField in interface AnnotatortimeField in class AbstractAnnotatorfield - the field that contains data that will be serializednode - the schema node defining this propertypublic void dateTimeField(com.sun.codemodel.JFieldVar field,
com.sun.codemodel.JDefinedClass clazz,
com.fasterxml.jackson.databind.JsonNode node)
AnnotatordateTimeField in interface AnnotatordateTimeField in class AbstractAnnotatorfield - the field that contains data that will be serializednode - the schema node defining this propertyCopyright © 2023. All rights reserved.