KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > picocontainer > defaults > CyclicDependencyGuard


1 /*
2  * Copyright (C) 2004 Joerg Schaible
3  * Created on 07.09.2004 by joehni
4  */

5 package org.picocontainer.defaults;
6
7 /**
8  * TODO Auto-generated JavaDoc
9  *
10  * @author joehni
11  * @since 1.1
12  */

13 public interface CyclicDependencyGuard {
14
15     /**
16      * Derive from this class and implement this function with the functionality
17      * to observe for a dependency cycle.
18      *
19      * @return a value, if the functionality result in an expression,
20      * otherwise just return <code>null</code>
21      */

22     public Object JavaDoc run();
23     
24     /**
25      * Call the observing function. The provided guard will hold the {@link Boolean} value.
26      * If the guard is already <code>Boolean.TRUE</code> a {@link CyclicDependencyException}
27      * will be thrown.
28      *
29      * @param stackFrame the current stack frame
30      * @return the result of the <code>run</code> method
31      */

32     public Object JavaDoc observe(Class JavaDoc stackFrame);
33 }
Popular Tags