me.springframework.sample.cmdline.factory
Class BeanFactory

java.lang.Object
  extended by me.springframework.sample.cmdline.factory.BeanFactory
All Implemented Interfaces:
MinimalBeanFactory

public class BeanFactory
extends java.lang.Object
implements MinimalBeanFactory

An object factory, providing access to a network of wired objects, some of them lazily instantiated. You can refer to some objects by name. The named objects managed by this class are:


Constructor Summary
BeanFactory()
          Constructs an instance of this bean factory.
 
Method Summary
 java.lang.Object getBean(java.lang.String name)
          Returns an object by looking it up by its name.
 void stop()
          "Stops" the BeanFactory; instances that have an destroy-method defined will get that method invoked.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanFactory

public BeanFactory()
Constructs an instance of this bean factory.

Method Detail

getBean

public java.lang.Object getBean(java.lang.String name)
                         throws BeansException
Returns an object by looking it up by its name.

Specified by:
getBean in interface MinimalBeanFactory
Returns:
The object with the given name, constructed by the BeanFactory.
Throws:
BeansException - In case of problems creating the bean.
See Also:
BeanFactory

stop

public final void stop()
"Stops" the BeanFactory; instances that have an destroy-method defined will get that method invoked.



Copyright © 2009. All Rights Reserved.