01: /*****************************************************************************
02: * Copyright (C) PicoContainer Organization. All rights reserved. *
03: * ------------------------------------------------------------------------- *
04: * The software in this package is published under the terms of the BSD *
05: * style license a copy of which has been included with this distribution in *
06: * the LICENSE.txt file. *
07: *****************************************************************************/package org.picocontainer.gems.constraints;
08:
09: import org.picocontainer.ComponentAdapter;
10: import org.picocontainer.Parameter;
11:
12: /**
13: * Extension to {@link org.picocontainer.Parameter} that allows for
14: * constraint-based configuration of component parameters.
15: *
16: * @author Nick Sieger
17: */
18: public interface Constraint extends Parameter {
19: /**
20: * Evaluate whether the given component adapter matches this constraint.
21: *
22: * @param adapter a <code>ComponentAdapter</code> value
23: * @return true if the adapter matches the constraint
24: */
25: boolean evaluate(ComponentAdapter adapter);
26: }
|