Package cdc.issues.checks
Class LazyChecker<O>
- java.lang.Object
-
- cdc.issues.checks.AbstractChecker<O>
-
- cdc.issues.checks.LazyChecker<O>
-
- Type Parameters:
O- The checked object type.
- All Implemented Interfaces:
cdc.util.debug.Printable
public final class LazyChecker<O> extends AbstractChecker<O>
Implementation ofAbstractCheckerthat lazily delegate the work to a named checker.This must be used to define recursive checkers;
-
-
Constructor Summary
Constructors Constructor Description LazyChecker(SnapshotManager manager, Class<O> objectClass, String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CheckResultcheck(CheckContext context, O object, Location location)Method that must be specialized to check an object.booleanisEnabled()voidprint(PrintStream out, int level)-
Methods inherited from class cdc.issues.checks.AbstractChecker
accepts, addStat, check, checkAndStat, checkAndStat, getManager, getObjectClass
-
-
-
-
Constructor Detail
-
LazyChecker
public LazyChecker(SnapshotManager manager, Class<O> objectClass, String name)
-
-
Method Detail
-
print
public void print(PrintStream out, int level)
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabledin classAbstractChecker<O>- Returns:
trueif this checker is enabled.
-
check
public final CheckResult check(CheckContext context, O object, Location location)
Description copied from class:AbstractCheckerMethod that must be specialized to check an object.It is this method responsibility to store detected issues into the associated manager.
- Specified by:
checkin classAbstractChecker<O>- Parameters:
context- The context.object- The object to check.location- The object location.- Returns:
- The check result.
-
-