|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.fasterxml.jackson.databind.introspect.VisibilityChecker.Std
public static class VisibilityChecker.Std
Default standard implementation is purely based on visibility modifier of given class members, and its configured minimum levels. Implemented using "builder" (aka "Fluid") pattern, whereas instances are immutable, and configuration is achieved by chainable factory methods. As a result, type is declared is funky recursive generic type, to allow for sub-classing of build methods with property type co-variance.
Note on JsonAutoDetect
annotation: it is used to
access default minimum visibility access definitions.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.fasterxml.jackson.databind.introspect.VisibilityChecker |
---|
VisibilityChecker.Std |
Field Summary | |
---|---|
protected com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility |
_creatorMinLevel
|
protected com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility |
_fieldMinLevel
|
protected com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility |
_getterMinLevel
|
protected com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility |
_isGetterMinLevel
|
protected com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility |
_setterMinLevel
|
protected static VisibilityChecker.Std |
DEFAULT
This is the canonical base instance, configured with default visibility values |
Constructor Summary | |
---|---|
VisibilityChecker.Std(com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility v)
Costructor that will assign given visibility value for all properties. |
|
VisibilityChecker.Std(com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility getter,
com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility isGetter,
com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility setter,
com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility creator,
com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility field)
Constructor that allows directly specifying minimum visibility levels to use |
|
VisibilityChecker.Std(com.fasterxml.jackson.annotation.JsonAutoDetect ann)
Constructor used for building instance that has minumum visibility levels as indicated by given annotation instance |
Method Summary | |
---|---|
static VisibilityChecker.Std |
defaultInstance()
|
boolean |
isCreatorVisible(AnnotatedMember m)
|
boolean |
isCreatorVisible(Member m)
Method for checking whether given method is auto-detectable as Creator, with respect to its visibility (not considering method signature or name, just visibility) |
boolean |
isFieldVisible(AnnotatedField f)
|
boolean |
isFieldVisible(Field f)
Method for checking whether given field is auto-detectable as property, with respect to its visibility (not considering method signature or name, just visibility) |
boolean |
isGetterVisible(AnnotatedMethod m)
|
boolean |
isGetterVisible(Method m)
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) |
boolean |
isIsGetterVisible(AnnotatedMethod m)
|
boolean |
isIsGetterVisible(Method m)
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) |
boolean |
isSetterVisible(AnnotatedMethod m)
|
boolean |
isSetterVisible(Method m)
Method for checking whether given method is auto-detectable as setter, with respect to its visibility (not considering method signature or name, just visibility) |
String |
toString()
|
VisibilityChecker.Std |
with(com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility v)
Builder method that will create and return an instance that has specified JsonAutoDetect.Visibility value to use for all property elements. |
VisibilityChecker.Std |
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. |
VisibilityChecker.Std |
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) |
VisibilityChecker.Std |
withFieldVisibility(com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility v)
Builder method that will return a checker instance that has specified minimum visibility level for fields. |
VisibilityChecker.Std |
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. |
VisibilityChecker.Std |
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"). |
VisibilityChecker.Std |
withSetterVisibility(com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility v)
Builder method that will return a checker instance that has specified minimum visibility level for setters. |
VisibilityChecker.Std |
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 specified JsonAutoDetect.Visibility value to use for specified property. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final VisibilityChecker.Std DEFAULT
protected final com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility _getterMinLevel
protected final com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility _isGetterMinLevel
protected final com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility _setterMinLevel
protected final com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility _creatorMinLevel
protected final com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility _fieldMinLevel
Constructor Detail |
---|
public VisibilityChecker.Std(com.fasterxml.jackson.annotation.JsonAutoDetect ann)
ann
- Annotations to use for determining minimum visibility levelspublic VisibilityChecker.Std(com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility getter, com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility isGetter, com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility setter, com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility creator, com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility field)
public VisibilityChecker.Std(com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility v)
v
- level to use for all property typesMethod Detail |
---|
public static VisibilityChecker.Std defaultInstance()
public VisibilityChecker.Std with(com.fasterxml.jackson.annotation.JsonAutoDetect ann)
VisibilityChecker
with
in interface VisibilityChecker<VisibilityChecker.Std>
public VisibilityChecker.Std with(com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility v)
VisibilityChecker
JsonAutoDetect.Visibility
value 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)
with
in interface VisibilityChecker<VisibilityChecker.Std>
public VisibilityChecker.Std withVisibility(com.fasterxml.jackson.annotation.PropertyAccessor method, com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility v)
VisibilityChecker
JsonAutoDetect.Visibility
value 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)
withVisibility
in interface VisibilityChecker<VisibilityChecker.Std>
public VisibilityChecker.Std withGetterVisibility(com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility v)
VisibilityChecker
withGetterVisibility
in interface VisibilityChecker<VisibilityChecker.Std>
public VisibilityChecker.Std withIsGetterVisibility(com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility v)
VisibilityChecker
withIsGetterVisibility
in interface VisibilityChecker<VisibilityChecker.Std>
public VisibilityChecker.Std withSetterVisibility(com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility v)
VisibilityChecker
withSetterVisibility
in interface VisibilityChecker<VisibilityChecker.Std>
public VisibilityChecker.Std withCreatorVisibility(com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility v)
VisibilityChecker
withCreatorVisibility
in interface VisibilityChecker<VisibilityChecker.Std>
public VisibilityChecker.Std withFieldVisibility(com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility v)
VisibilityChecker
withFieldVisibility
in interface VisibilityChecker<VisibilityChecker.Std>
public boolean isCreatorVisible(Member m)
VisibilityChecker
isCreatorVisible
in interface VisibilityChecker<VisibilityChecker.Std>
public boolean isCreatorVisible(AnnotatedMember m)
isCreatorVisible
in interface VisibilityChecker<VisibilityChecker.Std>
public boolean isFieldVisible(Field f)
VisibilityChecker
isFieldVisible
in interface VisibilityChecker<VisibilityChecker.Std>
public boolean isFieldVisible(AnnotatedField f)
isFieldVisible
in interface VisibilityChecker<VisibilityChecker.Std>
public boolean isGetterVisible(Method m)
VisibilityChecker
isGetterVisible
in interface VisibilityChecker<VisibilityChecker.Std>
public boolean isGetterVisible(AnnotatedMethod m)
isGetterVisible
in interface VisibilityChecker<VisibilityChecker.Std>
public boolean isIsGetterVisible(Method m)
VisibilityChecker
isIsGetterVisible
in interface VisibilityChecker<VisibilityChecker.Std>
public boolean isIsGetterVisible(AnnotatedMethod m)
isIsGetterVisible
in interface VisibilityChecker<VisibilityChecker.Std>
public boolean isSetterVisible(Method m)
VisibilityChecker
isSetterVisible
in interface VisibilityChecker<VisibilityChecker.Std>
public boolean isSetterVisible(AnnotatedMethod m)
isSetterVisible
in interface VisibilityChecker<VisibilityChecker.Std>
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |