public interface IContainerContext
| 限定符和类型 | 方法和说明 |
|---|---|
<T> T |
getBean(@NonNull Class<T> requiredType)
Return the bean instance that uniquely matches the given object type, if any.
|
<T> T |
getBean(@NonNull String name,
@NonNull Class<T> requiredType)
Return an instance, which may be shared or independent, of the specified bean.
|
<T> T getBean(@NonNull
@NonNull Class<T> requiredType)
throws RuntimeException
T - requiredType - type the bean must match; can be an interface or superclassRuntimeException - if the bean could not be obtained<T> T getBean(@NonNull
@NonNull String name,
@NonNull
@NonNull Class<T> requiredType)
throws RuntimeException
T - name - the name of the bean to retrieverequiredType - type the bean must match; can be an interface or superclassRuntimeException - if the bean could not be obtainedCopyright © 2020–2023. All rights reserved.