public static class VisibilityChecker.Std extends Object implements VisibilityChecker<VisibilityChecker.Std>
Note on JsonAutoDetect
annotation: it is used to
access default minimum visibility access definitions.
VisibilityChecker.Std
限定符和类型 | 字段和说明 |
---|---|
protected JsonAutoDetect.Visibility |
_creatorMinLevel |
protected JsonAutoDetect.Visibility |
_fieldMinLevel |
protected JsonAutoDetect.Visibility |
_getterMinLevel |
protected JsonAutoDetect.Visibility |
_isGetterMinLevel |
protected JsonAutoDetect.Visibility |
_setterMinLevel |
protected static VisibilityChecker.Std |
DEFAULT
This is the canonical base instance, configured with default
visibility values
|
构造器和说明 |
---|
VisibilityChecker.Std(JsonAutoDetect.Visibility v)
Costructor that will assign given visibility value for all
properties.
|
VisibilityChecker.Std(JsonAutoDetect.Visibility getter,
JsonAutoDetect.Visibility isGetter,
JsonAutoDetect.Visibility setter,
JsonAutoDetect.Visibility creator,
JsonAutoDetect.Visibility field)
Constructor that allows directly specifying minimum visibility levels to use
|
VisibilityChecker.Std(JsonAutoDetect ann)
Constructor used for building instance that has minumum visibility
levels as indicated by given annotation instance
|
限定符和类型 | 方法和说明 |
---|---|
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(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(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(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(JsonAutoDetect.Visibility v)
Builder method that will return a checker instance that has
specified minimum visibility level for fields.
|
VisibilityChecker.Std |
withGetterVisibility(JsonAutoDetect.Visibility v)
Builder method that will return a checker instance that has
specified minimum visibility level for regular ("getXxx") getters.
|
VisibilityChecker.Std |
withIsGetterVisibility(JsonAutoDetect.Visibility v)
Builder method that will return a checker instance that has
specified minimum visibility level for "is-getters" ("isXxx").
|
VisibilityChecker.Std |
withSetterVisibility(JsonAutoDetect.Visibility v)
Builder method that will return a checker instance that has
specified minimum visibility level for setters.
|
VisibilityChecker.Std |
withVisibility(JsonMethod method,
JsonAutoDetect.Visibility v)
Builder method that will create and return an instance that has specified
JsonAutoDetect.Visibility value to use for specified property. |
protected static final VisibilityChecker.Std DEFAULT
protected final JsonAutoDetect.Visibility _getterMinLevel
protected final JsonAutoDetect.Visibility _isGetterMinLevel
protected final JsonAutoDetect.Visibility _setterMinLevel
protected final JsonAutoDetect.Visibility _creatorMinLevel
protected final JsonAutoDetect.Visibility _fieldMinLevel
public VisibilityChecker.Std(JsonAutoDetect ann)
ann
- Annotations to use for determining minimum visibility levelspublic VisibilityChecker.Std(JsonAutoDetect.Visibility getter, JsonAutoDetect.Visibility isGetter, JsonAutoDetect.Visibility setter, JsonAutoDetect.Visibility creator, JsonAutoDetect.Visibility field)
public VisibilityChecker.Std(JsonAutoDetect.Visibility v)
v
- level to use for all property typespublic static VisibilityChecker.Std defaultInstance()
public VisibilityChecker.Std with(JsonAutoDetect ann)
VisibilityChecker
with
在接口中 VisibilityChecker<VisibilityChecker.Std>
public VisibilityChecker.Std with(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
在接口中 VisibilityChecker<VisibilityChecker.Std>
public VisibilityChecker.Std withVisibility(JsonMethod method, 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
在接口中 VisibilityChecker<VisibilityChecker.Std>
public VisibilityChecker.Std withGetterVisibility(JsonAutoDetect.Visibility v)
VisibilityChecker
public VisibilityChecker.Std withIsGetterVisibility(JsonAutoDetect.Visibility v)
VisibilityChecker
public VisibilityChecker.Std withSetterVisibility(JsonAutoDetect.Visibility v)
VisibilityChecker
public VisibilityChecker.Std withCreatorVisibility(JsonAutoDetect.Visibility v)
VisibilityChecker
public VisibilityChecker.Std withFieldVisibility(JsonAutoDetect.Visibility v)
VisibilityChecker
public boolean isCreatorVisible(Member m)
VisibilityChecker
public boolean isCreatorVisible(AnnotatedMember m)
public boolean isFieldVisible(Field f)
VisibilityChecker
isFieldVisible
在接口中 VisibilityChecker<VisibilityChecker.Std>
public boolean isFieldVisible(AnnotatedField f)
isFieldVisible
在接口中 VisibilityChecker<VisibilityChecker.Std>
public boolean isGetterVisible(Method m)
VisibilityChecker
public boolean isGetterVisible(AnnotatedMethod m)
public boolean isIsGetterVisible(Method m)
VisibilityChecker
public boolean isIsGetterVisible(AnnotatedMethod m)
public boolean isSetterVisible(Method m)
VisibilityChecker
public boolean isSetterVisible(AnnotatedMethod m)