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()
BeanResolverProvided 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 AutoCloseableclose in interface BeanResolverAutoCloseable.close()public <T> BeanHolder<T> resolve(Class<T> typeReference)
BeanResolverresolve in interface BeanResolverT - 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)
BeanResolverresolve in interface BeanResolverT - 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.