public class ConstantParameter extends AbstractParameter implements Parameter, Serializable
Strings,Integers or any other object that is not registered in
the container.Parameter.DelegateResolver, Parameter.NotResolved, Parameter.Resolver, Parameter.ValueResolver| Constructor and Description |
|---|
ConstantParameter(Object value) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(PicoVisitor visitor)
Visit the current
Parameter. |
protected boolean |
isAssignable(Type expectedType) |
Parameter.Resolver |
resolve(PicoContainer container,
ComponentAdapter<?> forAdapter,
ComponentAdapter<?> injecteeAdapter,
Type expectedType,
NameBinding expectedNameBinding,
boolean useNames,
Annotation binding)
Check if the Parameter can satisfy the expected type using the container.
|
void |
verify(PicoContainer container,
ComponentAdapter<?> adapter,
Type expectedType,
NameBinding expectedNameBinding,
boolean useNames,
Annotation binding)
Verify that the Parameter can satisfy the expected type using the container
|
isResolvable, resolveInstanceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisResolvable, resolveInstancepublic ConstantParameter(Object value)
public Parameter.Resolver resolve(PicoContainer container, ComponentAdapter<?> forAdapter, ComponentAdapter<?> injecteeAdapter, Type expectedType, NameBinding expectedNameBinding, boolean useNames, Annotation binding)
Parameterresolve in interface Parametercontainer - the container from which dependencies are resolved.forAdapter - the ComponentAdapter that is asking for the instanceinjecteeAdapter - the adapter to be injected into (null for N/A)expectedType - the required typeexpectedNameBinding - Expected parameter nameuseNames - should use parameter names for disambiguationbinding - @return true if the component parameter can be resolved.public void verify(PicoContainer container, ComponentAdapter<?> adapter, Type expectedType, NameBinding expectedNameBinding, boolean useNames, Annotation binding) throws PicoException
verify in interface Parametercontainer - the container from which dependencies are resolved.adapter - the ComponentAdapter that is asking for the verificationexpectedType - the required typeexpectedNameBinding - Expected parameter namePicoCompositionException - if parameter and its dependencies cannot be resolvedPicoExceptionParameter.verify(org.picocontainer.PicoContainer,org.picocontainer.ComponentAdapter,java.lang.reflect.Type,org.picocontainer.NameBinding,boolean,java.lang.annotation.Annotation)protected boolean isAssignable(Type expectedType)
public void accept(PicoVisitor visitor)
Parameter.accept in interface Parametervisitor - the visitor.Parameter.accept(org.picocontainer.PicoVisitor)Copyright © 2003-2014 Codehaus. All Rights Reserved.