クラス InjectionMetadata
java.lang.ObjectSE
org.springframework.beans.factory.annotation.InjectionMetadata
インジェクションメタデータを管理するための内部クラス。
アプリケーションで直接使用するためのものではありません。
AutowiredAnnotationBeanPostProcessor
、CommonAnnotationBeanPostProcessor
、PersistenceAnnotationBeanPostProcessor
で使用されます。
- 導入:
- 2.5
- 作成者:
- Juergen Hoeller
ネストされたクラスのサマリー
ネストされたクラスフィールドのサマリー
フィールドコンストラクターの概要
コンストラクターコンストラクター説明InjectionMetadata
(ClassSE<?> targetClass, CollectionSE<InjectionMetadata.InjectedElement> elements) 新しいInjectionMetadata instance
を作成します。メソッドのサマリー
修飾子と型メソッド説明void
checkConfigMembers
(RootBeanDefinition beanDefinition) void
clear
(PropertyValues pvs) 含まれている要素のプロパティスキップをクリアします。static InjectionMetadata
forElements
(CollectionSE<InjectionMetadata.InjectedElement> elements, ClassSE<?> clazz) 空の要素の場合は、InjectionMetadata
インスタンスを返します。注入するelements
を返します。指定されたPropertyValues
に基づいて注入するelements
を返します。void
inject
(ObjectSE target, StringSE beanName, PropertyValues pvs) protected boolean
needsRefresh
(ClassSE<?> clazz) このメタデータインスタンスをリフレッシュする必要があるかどうかを判断します。static boolean
needsRefresh
(InjectionMetadata metadata, ClassSE<?> clazz) 特定のインジェクションメタデータをリフレッシュする必要があるかどうかを確認します。
フィールドの詳細
EMPTY
何もしないコールバックを持つ空のInjectionMetadata
インスタンス。- 導入:
- 5.2
コンストラクターの詳細
InjectionMetadata
public InjectionMetadata(ClassSE<?> targetClass, CollectionSE<InjectionMetadata.InjectedElement> elements) 新しいInjectionMetadata instance
を作成します。要素がない場合に
EMPTY
インスタンスを再利用するには、forElements(java.util.Collection<org.springframework.beans.factory.annotation.InjectionMetadata.InjectedElement>, java.lang.Class<?>)
を使用することをお勧めします。- パラメーター:
targetClass
- ターゲットクラスelements
- 注入する関連要素- 関連事項:
メソッドの詳細
getInjectedElements
注入するelements
を返します。- 戻り値:
- 注入する要素
getInjectedElements
public CollectionSE<InjectionMetadata.InjectedElement> getInjectedElements(@Nullable PropertyValues pvs) 指定されたPropertyValues
に基づいて注入するelements
を返します。プロパティがInjectionMetadata.InjectedElement
に対してすでに定義されている場合、そのプロパティは除外されます。- パラメーター:
pvs
- 考慮すべきプロパティ値- 戻り値:
- 注入する要素
- 導入:
- 6.0.10
needsRefresh
このメタデータインスタンスをリフレッシュする必要があるかどうかを判断します。- パラメーター:
clazz
- 現在のターゲットクラス- 戻り値:
true
はリフレッシュを示し、false
はそれ以外の場合- 導入:
- 5.2.4
checkConfigMembers
inject
public void inject(ObjectSE target, @Nullable StringSE beanName, @Nullable PropertyValues pvs) throws ThrowableSE - 例外:
ThrowableSE
clear
含まれている要素のプロパティスキップをクリアします。- 導入:
- 3.2.13
forElements
public static InjectionMetadata forElements(CollectionSE<InjectionMetadata.InjectedElement> elements, ClassSE<?> clazz) 空の要素の場合は、InjectionMetadata
インスタンスを返します。- パラメーター:
elements
- 注入する要素 (空の可能性あり)clazz
- ターゲットクラス- 戻り値:
- 新しい
InjectionMetadata(Class, Collection)
インスタンス - 導入:
- 5.2
needsRefresh
@Contract("null, _ -> true") public static boolean needsRefresh(@Nullable InjectionMetadata metadata, ClassSE<?> clazz) 特定のインジェクションメタデータをリフレッシュする必要があるかどうかを確認します。- パラメーター:
metadata
- 既存のメタデータインスタンスclazz
- 現在のターゲットクラス- 戻り値:
true
はリフレッシュを示し、false
はそれ以外の場合- 関連事項: