001 /***************************************************************************** 002 * Copyright (C) PicoContainer Organization. All rights reserved. * 003 * ------------------------------------------------------------------------- * 004 * The software in this package is published under the terms of the BSD * 005 * style license a copy of which has been included with this distribution in * 006 * the LICENSE.txt file. * 007 *****************************************************************************/ 008 009 package org.picocontainer.gems.constraints; 010 011 import org.picocontainer.ComponentAdapter; 012 import org.picocontainer.Parameter; 013 014 /** 015 * Extension to {@link org.picocontainer.Parameter} that allows for 016 * constraint-based configuration of component parameters. 017 * 018 * @author Nick Sieger 019 */ 020 public interface Constraint extends Parameter { 021 /** 022 * Evaluate whether the given component adapter matches this constraint. 023 * 024 * @param adapter a <code>ComponentAdapter</code> value 025 * @return true if the adapter matches the constraint 026 */ 027 boolean evaluate(ComponentAdapter adapter); 028 }