gnu.beanfactory
Class Container

java.lang.Object
  |
  +--gnu.beanfactory.Container

public class Container
extends java.lang.Object

Container is the preferred API to access to the BeanContext container.

Author:
Rob Schoening <rob@beanfactory.net>

Method Summary
static BeanContext getBeanContext()
          This is the preferred method that application developers should use to obtain a reference to the singleton BeanContext.
static java.lang.Object lookup(java.lang.String url)
          Looks up a bean by its URL.
static java.lang.Object resolve(java.lang.String url)
          Resolves a bean or bean property by its URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getBeanContext

public static BeanContext getBeanContext()
This is the preferred method that application developers should use to obtain a reference to the singleton BeanContext. Please note that this method is guaranteed not to throw any exceptions, runtime or checked, so it is safe to use in class or object initializers.

lookup

public static java.lang.Object lookup(java.lang.String url)
                               throws BeanFactoryException
Looks up a bean by its URL.
Parameters:
url - the bean URL to look up (Example: bean:/my/Bean)

resolve

public static java.lang.Object resolve(java.lang.String url)
                                throws BeanFactoryException
Resolves a bean or bean property by its URL. This method will resolve nested properties.
Parameters:
url - the bean URL to resolve (Example: bean:/my/Bean.myProperty)
Throws:
NestedNullPointerException - if nested property causes an indirect null pointer exception.