public abstract class BeanResolver extends Object
Modifier and Type | Field and Description |
---|---|
protected static BeanResolver |
instance
The current Resolver.
|
Constructor and Description |
---|
BeanResolver() |
Modifier and Type | Method and Description |
---|---|
static BeanResolver |
getInstance() |
abstract <T> T |
resolve(Class<T> clazz)
Resolve a bean by its class
|
abstract <T> T |
resolve(Class<T> clazz,
boolean optional) |
abstract Object |
resolve(String name)
Resolve a bean by its name
|
abstract Object |
resolve(String name,
boolean optional)
Resolve bean by its class.
|
protected static BeanResolver instance
public static BeanResolver getInstance()
public abstract Object resolve(String name) throws IllegalStateException
name
- of the beanIllegalStateException
- if no bean is foundpublic abstract <T> T resolve(Class<T> clazz) throws IllegalStateException
T
- final class of bean valueclazz
- class to look forIllegalStateException
- if no bean is foundpublic abstract Object resolve(String name, boolean optional) throws IllegalStateException
name
- of the beanoptional
- if true and no bean found return nullIllegalStateException
- if no bean found and optional is set to falsepublic abstract <T> T resolve(Class<T> clazz, boolean optional) throws IllegalStateException
T
- final class of bean valueclazz
- class to look foroptional
- if true and no bean found return nullIllegalStateException
- if no bean found and optional is set to falseCopyright © 2012-2013. All Rights Reserved.