|
![]() |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.picocontainer.defaults.DecoratingComponentAdapter
org.picocontainer.defaults.BeanPropertyComponentAdapter
Decorating component adapter that can be used to set additional properties
on a component in a bean style. These properties must be managed manually
by the user of the API, and will not be managed by PicoContainer. This class
is therefore not the same as SetterInjectionComponentAdapter
,
which is a true Setter Injection adapter.
PropertyEditor
and using its setAsText
method.
Note that this class doesn't cache instances. If you want caching,
use a CachingComponentAdapter
around this one.
Constructor Summary | |
BeanPropertyComponentAdapter(ComponentAdapter delegate)
Construct a BeanPropertyComponentAdapter. |
Method Summary | |
static Object |
convert(String typeName,
String value,
ClassLoader classLoader)
Converts a String value of a named type to an object. |
Object |
getComponentInstance(PicoContainer container)
Get a component instance and set given property values. |
void |
setProperties(Map properties)
Sets the bean property values that should be set upon creation. |
Methods inherited from class org.picocontainer.defaults.DecoratingComponentAdapter |
accept, changeMonitor, currentMonitor, dispose, dispose, getComponentImplementation, getComponentKey, getDelegate, hasLifecycle, hasLifecycle, start, start, stop, stop, toString, verify |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public BeanPropertyComponentAdapter(ComponentAdapter delegate) throws PicoInitializationException
delegate
- the wrapped ComponentAdapter
PicoInitializationException
- {@inheritDoc}Method Detail |
public Object getComponentInstance(PicoContainer container) throws PicoInitializationException, PicoIntrospectionException, AssignabilityRegistrationException, NotConcreteRegistrationException
getComponentInstance
in interface ComponentAdapter
getComponentInstance
in class DecoratingComponentAdapter
PicoInitializationException
PicoIntrospectionException
AssignabilityRegistrationException
NotConcreteRegistrationException
setProperties(Map)
public static Object convert(String typeName, String value, ClassLoader classLoader) throws ClassNotFoundException
PropertyEditor
.
typeName
- name of the typevalue
- its valueclassLoader
- used to load a class if typeName is "class" or "java.lang.Class" (ignored otherwise)
ClassNotFoundException
- if typeName is "class" or "java.lang.Class" and class couldn't be loaded.public void setProperties(Map properties)
properties
- bean properties
|
![]() |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |