java.lang.Object
de.serra.so_dirty.sn.IgnoreSnapshotNodeFactory
- All Implemented Interfaces:
SnapshotNodeFactory
Always returns
null when SnapshotNodeFactory.toSnapshotNode(Object) is called.
Used to exclude some types that should not included in Snapshots.
Add this factory first to CompoundSnapshotNodeFactory.add(SnapshotNodeFactory) to make sure no other factory sees the value.
- Author:
- Peter Lamby
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a type that should be ignored by this Factory.booleanDetermines if this Factory is responsible fortype.@Nullable SnapshotNodetoSnapshotNode(Object value) Creates anSnapshotNodeforvalue.
-
Constructor Details
-
IgnoreSnapshotNodeFactory
public IgnoreSnapshotNodeFactory()Constructs.
-
-
Method Details
-
add
Adds a type that should be ignored by this Factory.- Parameters:
type- The type to ignore.includeSubtypes- whether to also ignore subtypes oftype.
-
supports
Description copied from interface:SnapshotNodeFactoryDetermines if this Factory is responsible fortype.- Specified by:
supportsin interfaceSnapshotNodeFactory- Parameters:
type- The type.- Returns:
trueif the type is supported.
-
toSnapshotNode
Description copied from interface:SnapshotNodeFactory- Specified by:
toSnapshotNodein interfaceSnapshotNodeFactory- Parameters:
value- The value for which to create an SnapshotNode.- Returns:
- The created node
-