public class JacksonModule extends Object implements Module
jackson-annotations.
JsonPropertyDescription and JsonClassDescription annotations.JsonProperty annotations.JsonValue annotations.| Constructor and Description |
|---|
JacksonModule()
Constructor, without any additional options.
|
JacksonModule(JacksonOption... options)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
applyToConfigBuilder(SchemaGeneratorConfigBuilder builder) |
protected com.fasterxml.jackson.databind.BeanDescription |
getBeanDescriptionForClass(com.fasterxml.classmate.ResolvedType targetType)
Create a jackson
BeanDescription for the given type's erased class in order to avoid having to re-create the complexity therein. |
protected String |
getPropertyNameOverrideBasedOnJsonNamingAnnotation(FieldScope field)
Alter the declaring name of the given field as per the declaring type's
JsonNaming annotation. |
protected String |
getPropertyNameOverrideBasedOnJsonPropertyAnnotation(MemberScope<?,?> member)
Look-up an alternative name as per the following order of priority.
|
protected boolean |
getReadOnlyCheck(MemberScope<?,?> member)
Determine whether the given field's/method's
JsonProperty annotation marks it as read-only. |
protected boolean |
getRequiredCheckBasedOnJsonPropertyAnnotation(MemberScope<?,?> member)
Look-up the given field's/method's
JsonProperty annotation and consider its "required" attribute. |
protected boolean |
getWriteOnlyCheck(MemberScope<?,?> member)
Determine whether the given field's/method's
JsonProperty annotation marks it as write-only. |
protected String |
resolveDescription(MemberScope<?,?> member)
Determine the given member's associated "description" in the following order of priority.
|
protected String |
resolveDescriptionForType(TypeScope scope)
Determine the given type's associated "description" via the following annotation.
|
protected boolean |
shouldIgnoreField(FieldScope field)
Determine whether a given field should be ignored, according to various jackson annotations for that purpose,
e.g. |
protected boolean |
shouldIgnoreMethod(MethodScope method)
Determine whether a given method should be ignored, according to various jackson annotations for that purpose,
e.g. |
public JacksonModule()
JacksonModule(JacksonOption...)public JacksonModule(JacksonOption... options)
options - features to enablepublic void applyToConfigBuilder(SchemaGeneratorConfigBuilder builder)
applyToConfigBuilder in interface Moduleprotected String resolveDescription(MemberScope<?,?> member)
JsonPropertyDescription annotation on the field/method itselfJsonPropertyDescription annotation on the field's getter method or the getter method's associated fieldmember - field/method for which to collect an available descriptionnull)protected String resolveDescriptionForType(TypeScope scope)
JsonClassDescription annotation on the targeted type's classscope - scope for which to collect an available descriptionnull)protected String getPropertyNameOverrideBasedOnJsonPropertyAnnotation(MemberScope<?,?> member)
JsonProperty annotation on the member itselfJsonProperty annotation on the field's getter method or the getter method's associated fieldmember - field/method to look-up alternative property name fornull)protected String getPropertyNameOverrideBasedOnJsonNamingAnnotation(FieldScope field)
JsonNaming annotation.field - field to look-up naming strategy fornull)protected final com.fasterxml.jackson.databind.BeanDescription getBeanDescriptionForClass(com.fasterxml.classmate.ResolvedType targetType)
BeanDescription for the given type's erased class in order to avoid having to re-create the complexity therein.
targetType - type for whose erased class the BeanDescription should be createdprotected boolean shouldIgnoreField(FieldScope field)
JsonBackReference, JsonIgnore, JsonIgnoreType, JsonIgnorePropertiesfield - field to checkprotected boolean shouldIgnoreMethod(MethodScope method)
JsonBackReference, JsonIgnore, JsonIgnoreType, JsonIgnorePropertiesmethod - method to checkprotected boolean getRequiredCheckBasedOnJsonPropertyAnnotation(MemberScope<?,?> member)
JsonProperty annotation and consider its "required" attribute.member - field/method to look-up required strategy forprotected boolean getReadOnlyCheck(MemberScope<?,?> member)
JsonProperty annotation marks it as read-only.member - field/method to check read-only status forprotected boolean getWriteOnlyCheck(MemberScope<?,?> member)
JsonProperty annotation marks it as write-only.member - field/method to check write-only status forCopyright © 2021 VicTools. All rights reserved.