![]() |
Saros
Distributed Collaborative Editing and Distributed Party Programming
|
Inherits Parameter, and Serializable.
Public Member Functions | |
BasicComponentParameter (Object componentKey) | |
BasicComponentParameter () | |
Resolver | resolve (final PicoContainer container, final ComponentAdapter<?> forAdapter, final ComponentAdapter<?> injecteeAdapter, final Type expectedType, NameBinding expectedNameBinding, boolean useNames, Annotation binding) |
void | verify (PicoContainer container, ComponentAdapter<?> forAdapter, Type expectedType, NameBinding expectedNameBinding, boolean useNames, Annotation binding) |
void | accept (final PicoVisitor visitor) |
Static Public Attributes | |
static final BasicComponentParameter | BASIC_DEFAULT = new BasicComponentParameter() |
Package Functions | |
protected< T > ComponentAdapter< T > | resolveAdapter (PicoContainer container, ComponentAdapter adapter, Class< T > expectedType, NameBinding expectedNameBinding, boolean useNames, Annotation binding) |
private< T > ComponentAdapter< T > | noMatchingAdaptersFound (PicoContainer container, Class< T > expectedType, NameBinding expectedNameBinding, Annotation binding) |
private< T > AbstractInjector.AmbiguousComponentResolutionException | tooManyMatchingAdaptersFound (Class< T > expectedType, List< ComponentAdapter< T >> found) |
private< T > void | removeExcludedAdapterIfApplicable (Object excludeKey, List< ComponentAdapter< T >> found) |
private< T > boolean | areCompatible (PicoContainer container, Class< T > expectedType, ComponentAdapter found) |
A BasicComponentParameter should be used to pass in a particular component as argument to a different component's constructor. This is particularly useful in cases where several components of the same type have been registered, but with a different key. Passing a ComponentParameter as a parameter when registering a component will give PicoContainer a hint about what other component to use in the constructor. This Parameter will never resolve against a collecting type, that is not directly registered in the PicoContainer itself.
org.picocontainer.parameters.BasicComponentParameter.BasicComponentParameter | ( | Object | componentKey | ) |
Expect a parameter matching a component of a specific key.
componentKey | the key of the desired addComponent |
org.picocontainer.parameters.BasicComponentParameter.BasicComponentParameter | ( | ) |
Expect any parameter of the appropriate type.
void org.picocontainer.parameters.BasicComponentParameter.accept | ( | final PicoVisitor | visitor | ) |
Visit the current Parameter.
private<T> boolean org.picocontainer.parameters.BasicComponentParameter.areCompatible | ( | PicoContainer | container, |
Class< T > | expectedType, | ||
ComponentAdapter | found | ||
) | [package] |
private<T> ComponentAdapter<T> org.picocontainer.parameters.BasicComponentParameter.noMatchingAdaptersFound | ( | PicoContainer | container, |
Class< T > | expectedType, | ||
NameBinding | expectedNameBinding, | ||
Annotation | binding | ||
) | [package] |
private<T> void org.picocontainer.parameters.BasicComponentParameter.removeExcludedAdapterIfApplicable | ( | Object | excludeKey, |
List< ComponentAdapter< T >> | found | ||
) | [package] |
Resolver org.picocontainer.parameters.BasicComponentParameter.resolve | ( | final PicoContainer | container, |
final ComponentAdapter<?> | forAdapter, | ||
final ComponentAdapter<?> | injecteeAdapter, | ||
final Type | expectedType, | ||
NameBinding | expectedNameBinding, | ||
boolean | useNames, | ||
Annotation | binding | ||
) |
Check whether the given Parameter can be satisfied by the container.
true
if the Parameter can be verified.org.picocontainer.PicoCompositionException |
protected<T> ComponentAdapter<T> org.picocontainer.parameters.BasicComponentParameter.resolveAdapter | ( | PicoContainer | container, |
ComponentAdapter | adapter, | ||
Class< T > | expectedType, | ||
NameBinding | expectedNameBinding, | ||
boolean | useNames, | ||
Annotation | binding | ||
) | [package] |
private<T> AbstractInjector.AmbiguousComponentResolutionException org.picocontainer.parameters.BasicComponentParameter.tooManyMatchingAdaptersFound | ( | Class< T > | expectedType, |
List< ComponentAdapter< T >> | found | ||
) | [package] |
void org.picocontainer.parameters.BasicComponentParameter.verify | ( | PicoContainer | container, |
ComponentAdapter<?> | forAdapter, | ||
Type | expectedType, | ||
NameBinding | expectedNameBinding, | ||
boolean | useNames, | ||
Annotation | binding | ||
) |
final BasicComponentParameter org.picocontainer.parameters.BasicComponentParameter.BASIC_DEFAULT = new BasicComponentParameter() [static] |
BASIC_DEFAULT
is an instance of BasicComponentParameter using the default constructor.