Klasse IgnoreSnapshotNodeFactory

java.lang.Object
de.serra.so_dirty.sn.IgnoreSnapshotNodeFactory
Alle implementierten Schnittstellen:
SnapshotNodeFactory

public class IgnoreSnapshotNodeFactory extends Object implements 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.

Autor:
Peter Lamby
  • Konstruktordetails

    • IgnoreSnapshotNodeFactory

      public IgnoreSnapshotNodeFactory()
      Constructs.
  • Methodendetails

    • add

      public void add(Class<?> type, boolean includeSubtypes)
      Adds a type that should be ignored by this Factory.
      Parameter:
      type - The type to ignore.
      includeSubtypes - whether to also ignore subtypes of type.
    • supports

      public boolean supports(Class<?> type)
      Beschreibung aus Schnittstelle kopiert: SnapshotNodeFactory
      Determines if this Factory is responsible for type.
      Angegeben von:
      supports in Schnittstelle SnapshotNodeFactory
      Parameter:
      type - The type.
      Gibt zurück:
      true if the type is supported.
    • toSnapshotNode

      public @Nullable SnapshotNode toSnapshotNode(Object value)
      Beschreibung aus Schnittstelle kopiert: SnapshotNodeFactory
      Creates an SnapshotNode for value. Only call this if the type is supported.
      Angegeben von:
      toSnapshotNode in Schnittstelle SnapshotNodeFactory
      Parameter:
      value - The value for which to create an SnapshotNode.
      Gibt zurück:
      The created node