org.picocontainer.defaults
Interface CyclicDependencyGuard

All Known Implementing Classes:
InstantiatingComponentAdapter.Guard, ThreadLocalCyclicDependencyGuard

public interface CyclicDependencyGuard

Interface for a guard implementation looking after cyclic dependencies.

Since:
1.1
Author:
Jörg Schaible

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

Method Detail

run

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

Object observe(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


Copyright © 2003-2010 Codehaus. All Rights Reserved.