net.sf.qualitytest.blueprint
Interface CycleHandlingStrategy<T>

Type Parameters:
T -
All Known Implementing Classes:
ExceptionCycleHandlingStrategy, NullCycleHandlingStrategy

public interface CycleHandlingStrategy<T>

Interface for strategies to decide how cycles in the blueprinting graph are supposed to be handled.

Author:
dominik.seichter

Method Summary
 T handleCycle(BlueprintSession session, Class<?> clazz)
          Handle the situation that a BlueprintCycle was detected for a particular class.
 boolean isActiveForType(Class<?> clazz)
          Decide whether this strategy is active for a given type.
 

Method Detail

handleCycle

@Nullable
T handleCycle(@Nonnull
                       BlueprintSession session,
                       @Nonnull
                       Class<?> clazz)
Handle the situation that a BlueprintCycle was detected for a particular class. Is only called if isActiveForType is true for a specific class.

Type Parameters:
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

boolean isActiveForType(@Nonnull
                        Class<?> clazz)
Decide whether this strategy is active for a given type.

Type Parameters:
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.