org.picocontainer.gems.constraints
Class AbstractConstraint
java.lang.Object
org.picocontainer.defaults.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.
- Version:
- 1.1
- Author:
- Nick Sieger
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractConstraint
protected AbstractConstraint()
- Construct an AbstractContraint.
resolveInstance
public Object resolveInstance(PicoContainer container,
ComponentAdapter adapter,
Class expectedType)
throws PicoIntrospectionException
- Specified by:
resolveInstance
in interface Parameter
- Overrides:
resolveInstance
in class CollectionComponentParameter
- Throws:
PicoIntrospectionException
isResolvable
public boolean isResolvable(PicoContainer container,
ComponentAdapter adapter,
Class expectedType)
throws PicoIntrospectionException
- Specified by:
isResolvable
in interface Parameter
- Overrides:
isResolvable
in class CollectionComponentParameter
- Throws:
PicoIntrospectionException
verify
public void verify(PicoContainer container,
ComponentAdapter adapter,
Class expectedType)
throws PicoIntrospectionException
- Specified by:
verify
in interface Parameter
- Overrides:
verify
in class CollectionComponentParameter
- Throws:
PicoIntrospectionException
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 getMatchingComponentAdapters(PicoContainer container,
ComponentAdapter adapter,
Class keyType,
Class valueType)
- Overrides:
getMatchingComponentAdapters
in class CollectionComponentParameter
Copyright © 2003-2010 Codehaus. All Rights Reserved.