public class NullParameter extends AbstractParameter implements Serializable
ConstantParameter, we provide a Special Type
geared to marking nulls.Parameter.DelegateResolver, Parameter.NotResolved, Parameter.Resolver, Parameter.ValueResolver| Modifier and Type | Field and Description |
|---|---|
static NullParameter |
INSTANCE
The one and only instance of null parameter.
|
| Modifier | Constructor and Description |
|---|---|
protected |
NullParameter()
Only once instance of Null parameter needed.
|
| Modifier and Type | Method and Description |
|---|---|
void |
accept(PicoVisitor visitor)
Accepts a visitor for this Parameter.
|
protected boolean |
isAssignable(Type expectedType)
Nulls cannot be assigned to primitives.
|
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, resolveInstancepublic static final NullParameter INSTANCE
protected NullParameter()
public void accept(PicoVisitor visitor)
ComponentAdapter, that
cascades the visitor also down to all its Parameters.accept in interface Parametervisitor - the visitor.Parameter.accept(org.picocontainer.PicoVisitor)public Parameter.Resolver resolve(PicoContainer container, ComponentAdapter<?> forAdapter, ComponentAdapter<?> injecteeAdapter, Type expectedType, NameBinding expectedNameBinding, boolean useNames, Annotation binding)
resolve 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.Parameter.resolve(org.picocontainer.PicoContainer, org.picocontainer.ComponentAdapter, org.picocontainer.ComponentAdapter, java.lang.reflect.Type, org.picocontainer.NameBinding, boolean, java.lang.annotation.Annotation)public void verify(PicoContainer container, ComponentAdapter<?> adapter, Type expectedType, NameBinding expectedNameBinding, boolean useNames, Annotation binding)
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 nameParameter.verify(org.picocontainer.PicoContainer, org.picocontainer.ComponentAdapter, java.lang.reflect.Type, org.picocontainer.NameBinding, boolean, java.lang.annotation.Annotation)protected boolean isAssignable(Type expectedType)
expectedType - Copyright © 2003-2014 Codehaus. All Rights Reserved.