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
013 /**
014 * A constraint that matches any component adapter.
015 *
016 * @author Nick Sieger
017 */
018 @SuppressWarnings("serial")
019 public class Anything extends AbstractConstraint {
020
021 public static final Anything ANYTHING = new Anything();
022
023 public Anything() {
024 }
025
026 @Override
027 public boolean evaluate(final ComponentAdapter adapter) {
028 return true;
029 }
030 }