org.picocontainer.web.webwork2
Class PicoObjectFactory
java.lang.Object
com.opensymphony.xwork.ObjectFactory
org.picocontainer.web.webwork2.PicoObjectFactory
public class PicoObjectFactory
- extends com.opensymphony.xwork.ObjectFactory
XWork ObjectFactory which uses a PicoContainer to create component instances.
- Author:
- Cyrille Le Clerc, Jonas Engman, Mauro Talevi, Grégory Joseph, Konstatin Pribluda
| Methods inherited from class com.opensymphony.xwork.ObjectFactory |
buildAction, buildInterceptor, buildResult, buildValidator, getContinuationPackage, getObjectFactory, setContinuationPackage, setObjectFactory |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PicoObjectFactory
public PicoObjectFactory()
isNoArgConstructorRequired
public boolean isNoArgConstructorRequired()
- Overrides:
isNoArgConstructorRequired in class com.opensymphony.xwork.ObjectFactory
buildBean
public Object buildBean(Class clazz,
Map extraContext)
throws Exception
- Overrides:
buildBean in class com.opensymphony.xwork.ObjectFactory
- Throws:
Exception
buildBean
public Object buildBean(String className,
Map extraContext)
throws Exception
- Overrides:
buildBean in class com.opensymphony.xwork.ObjectFactory
- Throws:
Exception
getClassInstance
public Class getClassInstance(String className)
- Overrides:
getClassInstance in class com.opensymphony.xwork.ObjectFactory
buildBean
public Object buildBean(Class<?> actionClass)
throws Exception
- Instantiates an action using the PicoContainer found in the request scope.
if action or bean is not registered explicitely, new instance will be provided
on every invocation.
- Throws:
Exception- See Also:
com.opensymphony.xwork.ObjectFactory#buildBean(java.lang.Class)
buildBean
public Object buildBean(String className)
throws Exception
- As
ObjectFactory#buildBean(java.lang.String)does not delegate to
ObjectFactory#buildBean(java.lang.Class) but directly calls
clazz.newInstance(), overwrite this method to call
buildBean()
- Throws:
Exception- See Also:
com.opensymphony.xwork.ObjectFactory#buildBean(java.lang.String)
getActionClass
public Class<?> getActionClass(String className)
throws org.picocontainer.PicoCompositionException
- Throws:
org.picocontainer.PicoCompositionException
loadClass
protected Class<?> loadClass(String className)
throws ClassNotFoundException
- Throws:
ClassNotFoundException
Copyright © 2008. All Rights Reserved.