org.picocontainer.gems.constraints
Class AbstractConstraint
java.lang.Object
org.picocontainer.parameters.AbstractParameter
org.picocontainer.parameters.CollectionComponentParameter
org.picocontainer.gems.constraints.AbstractConstraint
- All Implemented Interfaces:
- Serializable, Constraint, Parameter
- Direct Known Subclasses:
- And, Anything, IsExactType, IsKey, IsKeyType, IsType, Not, Or
public abstract class AbstractConstraint
- extends CollectionComponentParameter
- implements Constraint
Base class for parameter constraints.
- Author:
- Nick Sieger
- See Also:
- Serialized Form
Method Summary |
abstract boolean |
evaluate(ComponentAdapter adapter)
Evaluate whether the given component adapter matches this constraint. |
protected Map<Object,ComponentAdapter<?>> |
getMatchingComponentAdapters(PicoContainer container,
ComponentAdapter adapter,
Class keyType,
Class valueType)
|
Parameter.Resolver |
resolve(PicoContainer container,
ComponentAdapter<?> forAdapter,
ComponentAdapter<?> injecteeAdapter,
Type expectedType,
NameBinding expectedNameBinding,
boolean useNames,
Annotation binding)
|
void |
verify(PicoContainer container,
ComponentAdapter<?> adapter,
Type expectedType,
NameBinding expectedNameBinding,
boolean useNames,
Annotation binding)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractConstraint
protected AbstractConstraint()
- Construct an AbstractContraint.
resolve
public Parameter.Resolver resolve(PicoContainer container,
ComponentAdapter<?> forAdapter,
ComponentAdapter<?> injecteeAdapter,
Type expectedType,
NameBinding expectedNameBinding,
boolean useNames,
Annotation binding)
throws PicoCompositionException
- Specified by:
resolve
in interface Parameter
- Overrides:
resolve
in class CollectionComponentParameter
- Throws:
PicoCompositionException
verify
public void verify(PicoContainer container,
ComponentAdapter<?> adapter,
Type expectedType,
NameBinding expectedNameBinding,
boolean useNames,
Annotation binding)
throws PicoCompositionException
- Specified by:
verify
in interface Parameter
- Overrides:
verify
in class CollectionComponentParameter
- Throws:
PicoCompositionException
evaluate
public abstract boolean evaluate(ComponentAdapter adapter)
- Description copied from interface:
Constraint
- Evaluate whether the given component adapter matches this constraint.
- Specified by:
evaluate
in interface Constraint
- Overrides:
evaluate
in class CollectionComponentParameter
- Parameters:
adapter
- a ComponentAdapter
value
- Returns:
- true if the adapter matches the constraint
getMatchingComponentAdapters
protected Map<Object,ComponentAdapter<?>> getMatchingComponentAdapters(PicoContainer container,
ComponentAdapter adapter,
Class keyType,
Class valueType)
- Overrides:
getMatchingComponentAdapters
in class CollectionComponentParameter
Copyright © 2003-2010 Codehaus. All Rights Reserved.