org.picocontainer.defaults
Interface CyclicDependencyGuard

All Known Implementing Classes:
ConstructorInjectionComponentAdapter.Guard, InstantiatingComponentAdapter.Guard, ThreadLocalCyclicDependencyGuard

public interface CyclicDependencyGuard

Interface for a guard implementation looking after cyclic dependencies.

Since:
1.1
Author:
Jörg Schaible

Method Summary
 java.lang.Object observe(java.lang.Class stackFrame)
          Call the observing function.
 java.lang.Object run()
          Derive from this class and implement this function with the functionality to observe for a dependency cycle.
 

Method Detail

run

java.lang.Object run()
Derive from this class and implement this function with the functionality to observe for a dependency cycle.

Returns:
a value, if the functionality result in an expression, otherwise just return null

observe

java.lang.Object observe(java.lang.Class stackFrame)
Call the observing function. The provided guard will hold the Boolean value. If the guard is already Boolean.TRUE a CyclicDependencyException will be thrown.

Parameters:
stackFrame - the current stack frame
Returns:
the result of the run method