Package de.danielbechler.diff.inclusion
Interface InclusionConfigurer
- All Known Implementing Classes:
InclusionService
public interface InclusionConfigurer
Allows to in- or exclude nodes based on property name, object type, category or location in the object graph.
Excluded nodes will not be compared, to make sure their accessors won't get called. This is useful in cases where
getters could throw exceptions under certain conditions or when certain accessors are expensive to call or simply
not relevant for the use-case.
In combination with categories this allows to define sub-sets of properties, in order to compare only relevant parts
of an object (e.g. exclude all properties marked as _metadata_.)
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfacestatic interface -
Method Summary
Modifier and TypeMethodDescriptionand()exclude()include()Includes elements (and implicitly all their children) based on certain criteria, unless their parent element is excluded.resolveUsing(InclusionResolver resolver) Registers a customInclusionResolver.
-
Method Details
-
include
InclusionConfigurer.ToInclude include()Includes elements (and implicitly all their children) based on certain criteria, unless their parent element is excluded. -
exclude
InclusionConfigurer.ToExclude exclude() -
resolveUsing
Registers a customInclusionResolver. Some objects may not be relevant or suitable for the comparison process. Using anInclusionResolveris a powerful and flexible way to detect and exclude those objects. Keep in mind that every single node in the object graph will be checked against each and every registeredInclusionResolver. If performance is important to you, make sure that calling its methods is as cheap as possible. -
and
ObjectDifferBuilder and()
-