public class IgnorePropertiesUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
IgnorePropertiesUtil.Checker
Helper class to encapsulate logic from static
shouldIgnore method
of util class. |
Constructor and Description |
---|
IgnorePropertiesUtil() |
Modifier and Type | Method and Description |
---|---|
static IgnorePropertiesUtil.Checker |
buildCheckerIfNeeded(Set<String> toIgnore,
Set<String> toInclude)
Factory method for creating and return a
IgnorePropertiesUtil.Checker instance if (and only if)
one needed. |
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)
|
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.
|
public static boolean shouldIgnore(Object value, Collection<String> toIgnore, Collection<String> toInclude)
public static IgnorePropertiesUtil.Checker buildCheckerIfNeeded(Set<String> toIgnore, Set<String> toInclude)
IgnorePropertiesUtil.Checker
instance if (and only if)
one needed.toIgnore
- Set of property names to ignore (may be null)toInclude
- Set of only property names to include (if null, undefined)null
otherwisepublic static Set<String> combineNamesToInclude(Set<String> prevToInclude, Set<String> newToInclude)
prevToInclude
- Existing set of names to include, if defined; null means "not defined"newToInclude
- New set of names to included, if defined; null means "not defined"null
; or the
non-null one (if only one is null
); or null
if both arguments null
.Copyright © 2008–2020 FasterXML. All rights reserved.