org.codehaus.waffle.registrar.pico
Class PicoRegistrar
java.lang.Object
org.codehaus.waffle.registrar.pico.PicoRegistrar
- All Implemented Interfaces:
- Registrar, RubyAwareRegistrar
public class PicoRegistrar
- extends java.lang.Object
- implements Registrar, RubyAwareRegistrar
This Registrar is backed by PicoContainer for managing Dependency Injection. This registrar
is passed to the custom registrar defined in the web.xml as a delegate.
- Author:
- Michael Ward, Mauro Talevi
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PicoRegistrar
public PicoRegistrar(org.picocontainer.MutablePicoContainer picoContainer,
ParameterResolver parameterResolver,
org.picocontainer.defaults.LifecycleStrategy lifecycleStrategy,
RegistrarMonitor registrarMonitor)
useInjection
public Registrar useInjection(Registrar.Injection injection)
- Description copied from interface:
Registrar
- Use the given injection type for component instantiation
- Specified by:
useInjection
in interface Registrar
- Parameters:
injection
- the Injection to use
- Returns:
- The Registrar
isRegistered
public boolean isRegistered(java.lang.Object typeOrInstance)
- Description copied from interface:
Registrar
- Determines if a component is already registered
- Specified by:
isRegistered
in interface Registrar
- Parameters:
typeOrInstance
- the component Class type or Object instance/key
- Returns:
- A boolean flag,
true
if component is registered
register
public Registrar register(java.lang.Class<?> type,
java.lang.Object... parameters)
- Specified by:
register
in interface Registrar
- Parameters:
type
- represent both the key and type the object will be registered underparameters
- any parameters needed to satisfy the component being registered
register
public Registrar register(java.lang.Object key,
java.lang.Class<?> type,
java.lang.Object... parameters)
- Specified by:
register
in interface Registrar
- Parameters:
key
- represent the key the object will be registered undertype
- represent the component typeparameters
- any parameters needed to satisfy the component being registered
registerInstance
public Registrar registerInstance(java.lang.Object instance)
- Specified by:
registerInstance
in interface Registrar
registerInstance
public Registrar registerInstance(java.lang.Object key,
java.lang.Object instance)
- Specified by:
registerInstance
in interface Registrar
registerNonCaching
public Registrar registerNonCaching(java.lang.Class<?> type,
java.lang.Object... parameters)
- Specified by:
registerNonCaching
in interface Registrar
registerNonCaching
public Registrar registerNonCaching(java.lang.Object key,
java.lang.Class<?> type,
java.lang.Object... parameters)
- Specified by:
registerNonCaching
in interface Registrar
registerRubyScript
public void registerRubyScript(java.lang.String key,
java.lang.String className)
- Specified by:
registerRubyScript
in interface RubyAwareRegistrar
registerComponentAdapter
public void registerComponentAdapter(org.picocontainer.ComponentAdapter componentAdapter)
application
public void application()
- Specified by:
application
in interface Registrar
session
public void session()
- Specified by:
session
in interface Registrar
request
public void request()
- Specified by:
request
in interface Registrar
Copyright © 2008. All Rights Reserved.