Interface VisibilityChecker<T extends VisibilityChecker<T>>
- All Known Implementing Classes:
VisibilityChecker.Std
public interface VisibilityChecker<T extends VisibilityChecker<T>>
Interface for object used for determine which property elements
(methods, fields, constructors) can be auto-detected, with respect
to their visibility modifiers.
Note on type declaration: funky recursive type is necessary to support builder/fluent pattern.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classDefault standard implementation is purely based on visibility modifier of given class members, and its configured minimum levels. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanMethod for checking whether given method is auto-detectable as Creator, with respect to its visibility (not considering method signature or name, just visibility)booleanbooleanMethod for checking whether given field is auto-detectable as property, with respect to its visibility (not considering method signature or name, just visibility)booleanbooleanMethod for checking whether given method is auto-detectable as regular getter, with respect to its visibility (not considering method signature or name, just visibility)booleanbooleanMethod for checking whether given method is auto-detectable as is-getter, with respect to its visibility (not considering method signature or name, just visibility)booleanbooleanMethod for checking whether given method is auto-detectable as setter, with respect to its visibility (not considering method signature or name, just visibility)with(com.fasterxml.jackson.annotation.JsonAutoDetect ann) Builder method that will return an instance that has same settings as this instance has, except for values that given annotation overrides.with(com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility v) Builder method that will create and return an instance that has specifiedJsonAutoDetect.Visibilityvalue to use for all property elements.withCreatorVisibility(com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility v) Builder method that will return a checker instance that has specified minimum visibility level for creator methods (constructors, factory methods)withFieldVisibility(com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility v) Builder method that will return a checker instance that has specified minimum visibility level for fields.withGetterVisibility(com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility v) Builder method that will return a checker instance that has specified minimum visibility level for regular ("getXxx") getters.withIsGetterVisibility(com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility v) Builder method that will return a checker instance that has specified minimum visibility level for "is-getters" ("isXxx").withOverrides(com.fasterxml.jackson.annotation.JsonAutoDetect.Value vis) Method that can be used for merging default values from `this` instance with specified overrides; and either return `this` if overrides had no effect (that is, result would be equal), or a new instance with merged visibility settings.withSetterVisibility(com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility v) Builder method that will return a checker instance that has specified minimum visibility level for setters.withVisibility(com.fasterxml.jackson.annotation.PropertyAccessor method, com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility v) Builder method that will create and return an instance that has specifiedJsonAutoDetect.Visibilityvalue to use for specified property.
-
Method Details
-
with
Builder method that will return an instance that has same settings as this instance has, except for values that given annotation overrides. -
withOverrides
Method that can be used for merging default values from `this` instance with specified overrides; and either return `this` if overrides had no effect (that is, result would be equal), or a new instance with merged visibility settings.- Since:
- 2.9
-
with
Builder method that will create and return an instance that has specifiedJsonAutoDetect.Visibilityvalue to use for all property elements. Typical usage would be something like:mapper.setVisibilityChecker( mapper.getVisibilityChecker().with(Visibility.NONE));(which would basically disable all auto-detection) -
withVisibility
T withVisibility(com.fasterxml.jackson.annotation.PropertyAccessor method, com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility v) Builder method that will create and return an instance that has specifiedJsonAutoDetect.Visibilityvalue to use for specified property. Typical usage would be:mapper.setVisibilityChecker( mapper.getVisibilityChecker().withVisibility(JsonMethod.FIELD, Visibility.ANY));(which would basically enable auto-detection for all member fields) -
withGetterVisibility
Builder method that will return a checker instance that has specified minimum visibility level for regular ("getXxx") getters. -
withIsGetterVisibility
Builder method that will return a checker instance that has specified minimum visibility level for "is-getters" ("isXxx"). -
withSetterVisibility
Builder method that will return a checker instance that has specified minimum visibility level for setters. -
withCreatorVisibility
Builder method that will return a checker instance that has specified minimum visibility level for creator methods (constructors, factory methods) -
withFieldVisibility
Builder method that will return a checker instance that has specified minimum visibility level for fields. -
isGetterVisible
Method for checking whether given method is auto-detectable as regular getter, with respect to its visibility (not considering method signature or name, just visibility) -
isGetterVisible
-
isIsGetterVisible
Method for checking whether given method is auto-detectable as is-getter, with respect to its visibility (not considering method signature or name, just visibility) -
isIsGetterVisible
-
isSetterVisible
Method for checking whether given method is auto-detectable as setter, with respect to its visibility (not considering method signature or name, just visibility) -
isSetterVisible
-
isCreatorVisible
Method for checking whether given method is auto-detectable as Creator, with respect to its visibility (not considering method signature or name, just visibility) -
isCreatorVisible
-
isFieldVisible
Method for checking whether given field is auto-detectable as property, with respect to its visibility (not considering method signature or name, just visibility) -
isFieldVisible
-