public class NoNullBeanApplicationContext extends BeanApplicationContext
BeanApplicationContext
that does not allow null to be returned.Constructor and Description |
---|
NoNullBeanApplicationContext() |
NoNullBeanApplicationContext(BeanFactory factory) |
Modifier and Type | Method and Description |
---|---|
<T> T |
find(Class<T> klass)
Looks for an object of the specified class.
|
<T> T |
get(String name)
Returns the object of the specified type with the specified name.
|
add, add, addAndReplace, findAll, getBeanFactory, hasBean, load, load, performShutdown, preDestroy, shutdown
public NoNullBeanApplicationContext()
public NoNullBeanApplicationContext(BeanFactory factory)
public <T> T get(String name)
get
in interface ApplicationContext
get
in class BeanApplicationContext
name
- the name of the object to returnNullBeanException
- if T was not found.public <T> T find(Class<T> klass)
find
in interface ApplicationContext
find
in class BeanApplicationContext
klass
- the class of the object to look for.NullBeanException
- if T was not found.Copyright © 2012 redlab.be. All Rights Reserved.