Top Inners Constructors Methods
com.fasterxml.jackson.databind.util

public Class IgnorePropertiesUtil

extends Object
Class Inheritance
Imports
java.util.Collection, .Collections, .HashSet, .Set

Since
2.12

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
IgnorePropertiesUtil.Checker

Helper class to encapsulate logic from static shouldIgnore method of util class.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static IgnorePropertiesUtil.Checker

Returns:

Checker, if validity checks are needed; null otherwise
buildCheckerIfNeeded
(Set<String>
Set of property names to ignore (may be null)
toIgnore
,
Set<String>
Set of only property names to include (if null, undefined)
toInclude
)

Factory method for creating and return a Checker instance if (and only if) one needed.

public static Set<String>

Returns:

Resulting set of names, using intersection if neither null; or the non-null one (if only one is null); or null if both arguments null.
combineNamesToInclude
(Set<String>
Existing set of names to include, if defined; null means "not defined"
prevToInclude
,
Set<String>
New set of names to included, if defined; null means "not defined"
newToInclude
)

Helper that encapsulates logic for combining two sets of "included names": default logic is to do intersection (name must be in both to be included in result)

public static boolean
shouldIgnore(Object value, Collection<String> toIgnore, Collection<String> toInclude)

Decide if we need to ignore a property or not, given a set of field to ignore and a set of field to include.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

IgnorePropertiesUtilback to summary
public IgnorePropertiesUtil()

Method Detail

buildCheckerIfNeededback to summary
public static IgnorePropertiesUtil.Checker buildCheckerIfNeeded(Set<String> toIgnore, Set<String> toInclude)

Factory method for creating and return a Checker instance if (and only if) one needed.

Parameters
toIgnore:Set<String>

Set of property names to ignore (may be null)

toInclude:Set<String>

Set of only property names to include (if null, undefined)

Returns:IgnorePropertiesUtil.Checker

Checker, if validity checks are needed; null otherwise

combineNamesToIncludeback to summary
public static Set<String> combineNamesToInclude(Set<String> prevToInclude, Set<String> newToInclude)

Helper that encapsulates logic for combining two sets of "included names": default logic is to do intersection (name must be in both to be included in result)

Parameters
prevToInclude:Set<String>

Existing set of names to include, if defined; null means "not defined"

newToInclude:Set<String>

New set of names to included, if defined; null means "not defined"

Returns:Set<String>

Resulting set of names, using intersection if neither null; or the non-null one (if only one is null); or null if both arguments null.

shouldIgnoreback to summary
public static boolean shouldIgnore(Object value, Collection<String> toIgnore, Collection<String> toInclude)

Decide if we need to ignore a property or not, given a set of field to ignore and a set of field to include.

com.fasterxml.jackson.databind.util back to summary

public final Class IgnorePropertiesUtil.Checker

extends Object
implements Serializable
Class Inheritance
  • java.lang.Object
  • com.fasterxml.jackson.databind.util.IgnorePropertiesUtil.Checker
All Implemented Interfaces
java.io.Serializable

Helper class to encapsulate logic from static shouldIgnore method of util class.

Field Summary

Modifier and TypeField and Description
private final Set<String>
private final Set<String>
private static final long

Constructor Summary

AccessConstructor and Description
private
Checker(Set<String> toIgnore, Set<String> toInclude)

Method Summary

Modifier and TypeMethod and Description
public static IgnorePropertiesUtil.Checker
construct(Set<String> toIgnore, Set<String> toInclude)

public boolean
shouldIgnore(Object propertyName)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_toIgnoreback to summary
private final Set<String> _toIgnore
_toIncludeback to summary
private final Set<String> _toInclude
serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

Checkerback to summary
private Checker(Set<String> toIgnore, Set<String> toInclude)

Method Detail

constructback to summary
public static IgnorePropertiesUtil.Checker construct(Set<String> toIgnore, Set<String> toInclude)
shouldIgnoreback to summary
public boolean shouldIgnore(Object propertyName)