net.sf.qualitytest.blueprint.strategy.cycle
Class ExceptionCycleHandlingStrategy
java.lang.Object
net.sf.qualitytest.blueprint.strategy.cycle.ExceptionCycleHandlingStrategy
- All Implemented Interfaces:
- CycleHandlingStrategy<Object>
public class ExceptionCycleHandlingStrategy
- extends Object
- implements CycleHandlingStrategy<Object>
The default handling strategy for cycles in the blueprinting graph, which throws a BlueprintCycleException
.
- Author:
- dominik.seichter
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExceptionCycleHandlingStrategy
public ExceptionCycleHandlingStrategy()
handleCycle
@Nullable
public Object handleCycle(@Nonnull
BlueprintSession session,
@Nonnull
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<Object>
- 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(@Nonnull
Class<?> clazz)
- Description copied from interface:
CycleHandlingStrategy
- Decide whether this strategy is active for a given type.
- Specified by:
isActiveForType
in interface CycleHandlingStrategy<Object>
- 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.