KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > picocontainer > gems > constraints > Constraint


1 /*****************************************************************************
2  * Copyright (C) PicoContainer Organization. All rights reserved. *
3  * ------------------------------------------------------------------------- *
4  * The software in this package is published under the terms of the BSD *
5  * style license a copy of which has been included with this distribution in *
6  * the LICENSE.txt file. *
7  *****************************************************************************/

8
9 package org.picocontainer.gems.constraints;
10
11 import org.picocontainer.ComponentAdapter;
12 import org.picocontainer.Parameter;
13
14 /**
15  * Extension to {@link org.picocontainer.Parameter} that allows for
16  * constraint-based configuration of component parameters.
17  *
18  * @author Nick Sieger
19  * @version 1.0
20  */

21 public interface Constraint extends Parameter {
22     /**
23      * Evaluate whether the given component adapter matches this constraint.
24      *
25      * @param adapter a <code>ComponentAdapter</code> value
26      * @return true if the adapter matches the constraint
27      */

28     boolean evaluate(ComponentAdapter adapter);
29 }
30
Popular Tags