net.sf.qualitytest.blueprint.strategy.cycle
Class NullCycleHandlingStrategy<T>
java.lang.Object
net.sf.qualitytest.blueprint.strategy.cycle.NullCycleHandlingStrategy<T>
- Type Parameters:
T
-
- All Implemented Interfaces:
- CycleHandlingStrategy<T>
public class NullCycleHandlingStrategy<T>
- extends Object
- implements CycleHandlingStrategy<T>
A simple strategy which set's the inner-object of a detected cycle to null.
- Author:
- dominik.seichter
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NullCycleHandlingStrategy
public NullCycleHandlingStrategy(@Nonnull
Class<T> clazz)
handleCycle
@Nullable
public T handleCycle(BlueprintSession session,
Class<?> clazz)
- Description copied from interface:
CycleHandlingStrategy
- Handle the situation that a BlueprintCycle was detected for a particular class. Is only called if
isActiveForType
is true for a specific class.
- Specified by:
handleCycle
in interface CycleHandlingStrategy<T>
- Parameters:
session
- The current BlueprintSession
clazz
- The class which caused cycle in the blueprinting graph
- Returns:
- a blue printed instance of
T
- See Also:
Blueprint
isActiveForType
public boolean isActiveForType(Class<?> clazz)
- Description copied from interface:
CycleHandlingStrategy
- Decide whether this strategy is active for a given type.
- Specified by:
isActiveForType
in interface CycleHandlingStrategy<T>
- Parameters:
clazz
- The class which caused cycle in the blueprinting graph
- Returns:
- a blue printed instance of
T
- See Also:
Blueprint
Copyright © 2012-2013. All Rights Reserved.