public class StaticFactoryComponentAdapter
extends org.picocontainer.defaults.AbstractComponentAdapter
StaticFactory
.Modifier and Type | Field and Description |
---|---|
private StaticFactory |
staticFactory |
Constructor and Description |
---|
StaticFactoryComponentAdapter(java.lang.Class type,
StaticFactory staticFactory)
Construct a ComponentAdapter accessing a static factory creating the component.
|
StaticFactoryComponentAdapter(java.lang.Object componentKey,
java.lang.Class type,
StaticFactory staticFactory)
Construct a ComponentAdapter accessing a static factory creating the component using a special key for component
registration.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getComponentInstance(org.picocontainer.PicoContainer container) |
void |
verify(org.picocontainer.PicoContainer container) |
accept, checkTypeCompatibility, getComponentImplementation, getComponentKey, toString
private StaticFactory staticFactory
public StaticFactoryComponentAdapter(java.lang.Class type, StaticFactory staticFactory)
type
- The type of the created component.staticFactory
- Wrapper instance for the static factory.public StaticFactoryComponentAdapter(java.lang.Object componentKey, java.lang.Class type, StaticFactory staticFactory)
componentKey
- The key of the created component.type
- The type of the created component.staticFactory
- Wrapper instance for the static factory.public java.lang.Object getComponentInstance(org.picocontainer.PicoContainer container) throws org.picocontainer.PicoInitializationException, org.picocontainer.PicoIntrospectionException
org.picocontainer.PicoInitializationException
org.picocontainer.PicoIntrospectionException
ComponentAdapter.getComponentInstance(org.picocontainer.PicoContainer)
public void verify(org.picocontainer.PicoContainer container) throws org.picocontainer.PicoVerificationException
org.picocontainer.PicoVerificationException
ComponentAdapter.verify(org.picocontainer.PicoContainer)