クラス 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を作成します。メソッドのサマリー
修飾子と型メソッド説明voidcheckConfigMembers(RootBeanDefinition beanDefinition) voidclear(PropertyValues pvs) 含まれている要素のプロパティスキップをクリアします。static InjectionMetadataforElements(CollectionSE<InjectionMetadata.InjectedElement> elements, ClassSE<?> clazz) 空の要素の場合は、InjectionMetadataインスタンスを返します。注入するelementsを返します。指定されたPropertyValuesに基づいて注入するelementsを返します。voidinject(ObjectSE target, StringSE beanName, PropertyValues pvs) protected booleanneedsRefresh(ClassSE<?> clazz) このメタデータインスタンスをリフレッシュする必要があるかどうかを判断します。static booleanneedsRefresh(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
特定のインジェクションメタデータをリフレッシュする必要があるかどうかを確認します。- パラメーター:
metadata- 既存のメタデータインスタンスclazz- 現在のターゲットクラス- 戻り値:
trueはリフレッシュを示し、falseはそれ以外の場合- 関連事項: