public final class ParameterResolutionDelegate extends ObjectSE
isAutowirable(java.lang.reflect.Parameter, int), resolveDependency(java.lang.reflect.Parameter, int, java.lang.Class<?>, org.springframework.beans.factory.config.AutowireCapableBeanFactory)| 修飾子と型 | メソッドと説明 |
|---|---|
static boolean | isAutowirable(ParameterSE parameter, int parameterIndex) 付属 ParameterSE が潜在的に AutowireCapableBeanFactory から autowired ことができるかどうかを判断します。 |
static ObjectSE | resolveDependency(ParameterSE parameter, int parameterIndex, ClassSE<?> containingClass, AutowireCapableBeanFactory beanFactory) 指定された ParameterSE の依存関係を、指定された AutowireCapableBeanFactory から解決します。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSEpublic static boolean isAutowirable(ParameterSE parameter, int parameterIndex)
ParameterSE が潜在的に AutowireCapableBeanFactory から autowired ことができるかどうかを判断します。 指定されたパラメーターに @Autowired、@Qualifier、または @Value のアノテーションが付けられているか、メタアノテーションが付けられている場合は、true を返します。
resolveDependency(java.lang.reflect.Parameter, int, java.lang.Class<?>, org.springframework.beans.factory.config.AutowireCapableBeanFactory) は、このメソッドが false を返した場合でも、指定されたパラメーターの依存関係を解決できる場合があることに注意してください。
parameter - 依存関係をオートワイヤーするパラメーター (null であってはなりません)parameterIndex - パラメーターを宣言するコンストラクターまたはメソッド内のパラメーターのインデックス resolveDependency(java.lang.reflect.Parameter, int, java.lang.Class<?>, org.springframework.beans.factory.config.AutowireCapableBeanFactory)@Nullable public static ObjectSE resolveDependency(ParameterSE parameter, int parameterIndex, ClassSE<?> containingClass, AutowireCapableBeanFactory beanFactory) throws BeansException
ParameterSE の依存関係を、指定された AutowireCapableBeanFactory から解決します。 プロパティプレースホルダーと @Value 宣言の SpEL 式をサポートする @Autowired、@Qualifier、@Value のサポートを含む、オートワイヤーフィールドおよびメソッドの Spring の依存性注入機能と同等の個々のメソッドパラメーターの包括的なオートワイヤーサポートを提供します。
パラメーターが @Autowired でアノテーション付けされているか、required フラグが false に設定されているメタアノテーションが付けられていない限り、依存関係が必要です。
明示的な修飾子が宣言されていない場合は、あいまいさを解決するための修飾子としてパラメーターの名前が使用されます。
parameter - 依存関係を解決する必要があるパラメーター (null であってはなりません)parameterIndex - パラメーターを宣言するコンストラクターまたはメソッド内のパラメーターのインデックス containingClass - パラメーターを含む具象クラス。これは、パラメーターを宣言するクラスとは異なる可能性があります。そのサブクラスである可能性があり、型変数を置き換える可能性があります (null であってはなりません)beanFactory - 依存関係を解決する AutowireCapableBeanFactory (null であってはなりません)null BeansException - 依存関係の解決に失敗した場合 isAutowirable(java.lang.reflect.Parameter, int), Autowired.required(), SynthesizingMethodParameter.forExecutable(Executable, int), AutowireCapableBeanFactory.resolveDependency(DependencyDescriptor, String)