public final class ReflectionBeanResolver extends Object implements BeanResolver
Constructor and Description |
---|
ReflectionBeanResolver(ClassResolver classResolver) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Release any internal resource created while resolving beans.
|
<T> BeanHolder<T> |
resolve(Class<T> typeReference)
Resolve a bean by its type.
|
<T> BeanHolder<T> |
resolve(Class<T> typeReference,
String implementationFullyQualifiedClassName)
Resolve a bean by its name.
|
<T> T |
resolveNoClosingNecessary(Class<T> typeReference) |
<T> T |
resolveNoClosingNecessary(Class<T> typeReference,
String implementationFullyQualifiedClassName) |
public ReflectionBeanResolver(ClassResolver classResolver)
public void close()
BeanResolver
Provided beans will not be usable after a call to this method.
May not release all resources that were allocated for each BeanHolder
;
BeanHolder.close()
still needs to be called consistently for each created bean.
close
in interface AutoCloseable
close
in interface BeanResolver
AutoCloseable.close()
public <T> BeanHolder<T> resolve(Class<T> typeReference)
BeanResolver
resolve
in interface BeanResolver
T
- The expected return type.typeReference
- The type of the bean to resolve.BeanHolder
containing the resolved bean.public <T> T resolveNoClosingNecessary(Class<T> typeReference)
public <T> BeanHolder<T> resolve(Class<T> typeReference, String implementationFullyQualifiedClassName)
BeanResolver
resolve
in interface BeanResolver
T
- The expected return type.typeReference
- The type of the bean to resolve.implementationFullyQualifiedClassName
- The name of the bean to resolve.BeanHolder
containing the resolved bean.Copyright © 2006-2019 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.