org.nanocontainer
Interface NanoContainer

All Known Subinterfaces:
NanoPicoContainer
All Known Implementing Classes:
AbstractNanoPicoContainer, DefaultNanoContainer, DefaultNanoPicoContainer, ImplementationHidingNanoPicoContainer

public interface NanoContainer

A NanoContainer is a container that contains a PicoContainer. -Like Russian dolls. A NanoContainer adapts a MutablePicoContainer through a similar API that is based only on Strings. (It uses reflection to look up classes before registering them with the adapted PicoContainer). This adapter API is used primarily by the various ScriptedContainerBuilder implementations in the org.nanocontainer.script.[scripting engine] packages.

Author:
Paul Hammant, Aslak Hellesøy

Method Summary
 ClassPathElement addClassLoaderURL(java.net.URL url)
          Adds a new URL that will be used in classloading
 org.picocontainer.MutablePicoContainer addDecoratingPicoContainer(java.lang.Class picoContainerClass)
           
 java.lang.ClassLoader getComponentClassLoader()
           
 java.lang.Object getComponentInstanceOfType(java.lang.String componentType)
          Find a component instance matching the specified type.
 org.picocontainer.MutablePicoContainer getPico()
          Returns the wrapped PicoContainer instance (russian doll concept).
 org.picocontainer.ComponentAdapter registerComponentImplementation(java.lang.Object key, java.lang.String componentImplementationClassName)
           
 org.picocontainer.ComponentAdapter registerComponentImplementation(java.lang.Object key, java.lang.String componentImplementationClassName, org.picocontainer.Parameter[] parameters)
           
 org.picocontainer.ComponentAdapter registerComponentImplementation(java.lang.Object key, java.lang.String componentImplementationClassName, java.lang.String[] parameterTypesAsString, java.lang.String[] parameterValuesAsString)
           
 org.picocontainer.ComponentAdapter registerComponentImplementation(java.lang.String componentImplementationClassName)
           
 org.picocontainer.ComponentAdapter registerComponentImplementation(java.lang.String componentImplementationClassName, java.lang.String[] parameterTypesAsString, java.lang.String[] parameterValuesAsString)
           
 

Method Detail

registerComponentImplementation

org.picocontainer.ComponentAdapter registerComponentImplementation(java.lang.String componentImplementationClassName)
                                                                   throws org.picocontainer.PicoRegistrationException,
                                                                          java.lang.ClassNotFoundException,
                                                                          org.picocontainer.PicoIntrospectionException
Throws:
org.picocontainer.PicoRegistrationException
java.lang.ClassNotFoundException
org.picocontainer.PicoIntrospectionException

registerComponentImplementation

org.picocontainer.ComponentAdapter registerComponentImplementation(java.lang.Object key,
                                                                   java.lang.String componentImplementationClassName)
                                                                   throws java.lang.ClassNotFoundException
Throws:
java.lang.ClassNotFoundException

registerComponentImplementation

org.picocontainer.ComponentAdapter registerComponentImplementation(java.lang.Object key,
                                                                   java.lang.String componentImplementationClassName,
                                                                   org.picocontainer.Parameter[] parameters)
                                                                   throws java.lang.ClassNotFoundException
Throws:
java.lang.ClassNotFoundException

registerComponentImplementation

org.picocontainer.ComponentAdapter registerComponentImplementation(java.lang.Object key,
                                                                   java.lang.String componentImplementationClassName,
                                                                   java.lang.String[] parameterTypesAsString,
                                                                   java.lang.String[] parameterValuesAsString)
                                                                   throws org.picocontainer.PicoRegistrationException,
                                                                          java.lang.ClassNotFoundException,
                                                                          org.picocontainer.PicoIntrospectionException
Throws:
org.picocontainer.PicoRegistrationException
java.lang.ClassNotFoundException
org.picocontainer.PicoIntrospectionException

registerComponentImplementation

org.picocontainer.ComponentAdapter registerComponentImplementation(java.lang.String componentImplementationClassName,
                                                                   java.lang.String[] parameterTypesAsString,
                                                                   java.lang.String[] parameterValuesAsString)
                                                                   throws org.picocontainer.PicoRegistrationException,
                                                                          java.lang.ClassNotFoundException,
                                                                          org.picocontainer.PicoIntrospectionException
Throws:
org.picocontainer.PicoRegistrationException
java.lang.ClassNotFoundException
org.picocontainer.PicoIntrospectionException

addClassLoaderURL

ClassPathElement addClassLoaderURL(java.net.URL url)
Adds a new URL that will be used in classloading

Parameters:
url -

getPico

org.picocontainer.MutablePicoContainer getPico()
Returns the wrapped PicoContainer instance (russian doll concept). The method name is short in order to favour the use of nano.pico from Groovy.

Returns:
the wrapped PicoContainer instance.

getComponentClassLoader

java.lang.ClassLoader getComponentClassLoader()

getComponentInstanceOfType

java.lang.Object getComponentInstanceOfType(java.lang.String componentType)
Find a component instance matching the specified type.

Parameters:
componentType - the type of the component.
Returns:
the adapter matching the class.

addDecoratingPicoContainer

org.picocontainer.MutablePicoContainer addDecoratingPicoContainer(java.lang.Class picoContainerClass)


Copyright © 2003-2010 Codehaus. All Rights Reserved.