クラス ContextConfigurationAttributes
java.lang.ObjectSE
org.springframework.test.context.ContextConfigurationAttributes
ContextConfigurationAttributes は、@ContextConfiguration を介して宣言されたコンテキスト構成属性をカプセル化します。- 導入:
- 3.1
- 作成者:
- Sam Brannen, Phillip Webb
- 関連事項:
コンストラクターの概要
コンストラクターコンストラクター説明ContextConfigurationAttributes(ClassSE<?> declaringClass) デフォルト値で新しいContextConfigurationAttributesインスタンスを構築します。ContextConfigurationAttributes(ClassSE<?> declaringClass, StringSE[] locations, ClassSE<?>[] classes, boolean inheritLocations, ClassSE<? extends ApplicationContextInitializer<?>>[] initializers, boolean inheritInitializers, ClassSE<? extends ContextLoader> contextLoaderClass) @ContextConfigurationアノテーションとそれに対応する属性を宣言したテストクラスSEの新しいContextConfigurationAttributesインスタンスを作成します。ContextConfigurationAttributes(ClassSE<?> declaringClass, StringSE[] locations, ClassSE<?>[] classes, boolean inheritLocations, ClassSE<? extends ApplicationContextInitializer<?>>[] initializers, boolean inheritInitializers, StringSE name, ClassSE<? extends ContextLoader> contextLoaderClass) @ContextConfigurationアノテーションとそれに対応する属性を宣言したテストクラスSEの新しいContextConfigurationAttributesインスタンスを作成します。ContextConfigurationAttributes(ClassSE<?> declaringClass, AnnotationAttributes annAttrs) 提供されたAnnotationAttributes(@ContextConfigurationアノテーションから解析された)および宣言したテストクラスの新しいContextConfigurationAttributesSE インスタンスを構築します。ContextConfigurationAttributes(ClassSE<?> declaringClass, ContextConfiguration contextConfiguration) 提供された@ContextConfigurationアノテーションとそれを宣言したテストクラスの新しいContextConfigurationAttributesSE インスタンスを構築します。メソッドのサマリー
修飾子と型メソッド説明boolean指定されたオブジェクトがこのContextConfigurationAttributesインスタンスと等しいかどうかを、両方のオブジェクトの宣言クラス、場所、アノテーション付きクラス、inheritLocations フラグ、コンテキスト初期化クラス、inheritInitializers フラグ、およびContextLoader classを比較して判断します。ClassSE<?>[]@ContextConfigurationを介して宣言されたアノテーション付きクラスを取得します。ClassSE<? extends ContextLoader>@ContextConfigurationを介して宣言されたContextLoaderクラスを取得します。ClassSE<?>明示的または暗黙的に、@ContextConfigurationアノテーションを宣言したクラスSEを取得します。ClassSE<? extends ApplicationContextInitializer<?>>[]@ContextConfigurationを介して宣言されたApplicationContextInitializerクラスを取得します。StringSE[]@ContextConfigurationを介して宣言されたリソースの場所を取得します。getName()@ContextConfigurationを介して宣言されたコンテキスト階層レベルの名前を取得します。booleanこのContextConfigurationAttributesインスタンスにクラスベースのリソースがあるかどうかを確認します。inthashCode()名前を除く、このContextConfigurationAttributesインスタンスのすべてのプロパティの一意のハッシュコードを生成します。booleanこのContextConfigurationAttributesインスタンスにパスベースのリソースの場所があるかどうかを確認します。booleanこのContextConfigurationAttributesインスタンスにパスベースのリソースの場所またはクラスベースのリソースがあるかどうかを確認します。boolean@ContextConfigurationを介して宣言されたinheritInitializersフラグを取得します。boolean@ContextConfigurationを介して宣言されたinheritLocationsフラグを取得します。voidsetClasses(ClassSE<?>... classes) 処理されたアノテーション付きクラスを設定し、@ContextConfigurationを介して宣言された元の値を効果的にオーバーライドします。voidsetLocations(StringSE... locations) @ContextConfigurationを介して宣言された元の値を効果的にオーバーライドして、処理されたリソースの場所を設定します。toString()コンテキスト構成属性と宣言クラスの String 表現を提供します。
コンストラクターの詳細
ContextConfigurationAttributes
デフォルト値で新しいContextConfigurationAttributesインスタンスを構築します。- パラメーター:
declaringClass-@ContextConfigurationを明示的または暗黙的に宣言したテストクラス- 導入:
- 4.3
ContextConfigurationAttributes
public ContextConfigurationAttributes(ClassSE<?> declaringClass, ContextConfiguration contextConfiguration) 提供された@ContextConfigurationアノテーションとそれを宣言したテストクラスの新しいContextConfigurationAttributesSE インスタンスを構築します。- パラメーター:
declaringClass-@ContextConfigurationを宣言したテストクラスcontextConfiguration- 属性を取得するためのアノテーション
ContextConfigurationAttributes
提供されたAnnotationAttributes(@ContextConfigurationアノテーションから解析された)および宣言したテストクラスの新しいContextConfigurationAttributesSE インスタンスを構築します。- パラメーター:
declaringClass-@ContextConfigurationを宣言したテストクラスannAttrs- 属性を取得するアノテーション属性
ContextConfigurationAttributes
public ContextConfigurationAttributes(ClassSE<?> declaringClass, StringSE[] locations, ClassSE<?>[] classes, boolean inheritLocations, ClassSE<? extends ApplicationContextInitializer<?>>[] initializers, boolean inheritInitializers, ClassSE<? extends ContextLoader> contextLoaderClass) @ContextConfigurationアノテーションとそれに対応する属性を宣言したテストクラスSEの新しいContextConfigurationAttributesインスタンスを作成します。- パラメーター:
declaringClass-@ContextConfigurationを宣言したテストクラスlocations-@ContextConfigurationを介して宣言されたリソースの場所classes-@ContextConfigurationを介して宣言されたアノテーション付きクラスinheritLocations-@ContextConfigurationを介して宣言されたinheritLocationsフラグinitializers-@ContextConfigurationを介して宣言されたコンテキスト初期化子inheritInitializers-@ContextConfigurationを介して宣言されたinheritInitializersフラグcontextLoaderClass-@ContextConfigurationを介して宣言されたContextLoaderクラス- 例外:
IllegalArgumentExceptionSE-declaringClassまたはcontextLoaderClassがnullの場合
ContextConfigurationAttributes
public ContextConfigurationAttributes(ClassSE<?> declaringClass, StringSE[] locations, ClassSE<?>[] classes, boolean inheritLocations, ClassSE<? extends ApplicationContextInitializer<?>>[] initializers, boolean inheritInitializers, @Nullable StringSE name, ClassSE<? extends ContextLoader> contextLoaderClass) @ContextConfigurationアノテーションとそれに対応する属性を宣言したテストクラスSEの新しいContextConfigurationAttributesインスタンスを作成します。- パラメーター:
declaringClass-@ContextConfigurationを宣言したテストクラスlocations-@ContextConfigurationを介して宣言されたリソースの場所classes-@ContextConfigurationを介して宣言されたアノテーション付きクラスinheritLocations-@ContextConfigurationを介して宣言されたinheritLocationsフラグinitializers-@ContextConfigurationを介して宣言されたコンテキスト初期化子inheritInitializers-@ContextConfigurationを介して宣言されたinheritInitializersフラグname- コンテキスト階層のレベルの名前、または該当しない場合はnullcontextLoaderClass-@ContextConfigurationを介して宣言されたContextLoaderクラス- 例外:
IllegalArgumentExceptionSE-declaringClassまたはcontextLoaderClassがnullの場合
メソッドの詳細
getDeclaringClass
明示的または暗黙的に、@ContextConfigurationアノテーションを宣言したクラスSEを取得します。- 戻り値:
- 宣言クラス (非
null)
setClasses
処理されたアノテーション付きクラスを設定し、@ContextConfigurationを介して宣言された元の値を効果的にオーバーライドします。- 関連事項:
getClasses
@ContextConfigurationを介して宣言されたアノテーション付きクラスを取得します。メモ: これは変更可能なプロパティです。戻り値は、
@ContextConfigurationを介して宣言された元の値と一致しない処理された値を表す場合があります。- 戻り値:
- アノテーション付きクラス (潜在的に { 空 )
- 関連事項:
hasClasses
public boolean hasClasses()このContextConfigurationAttributesインスタンスにクラスベースのリソースがあるかどうかを確認します。- 戻り値:
-
classes配列が空でない場合はtrue - 関連事項:
setLocations
@ContextConfigurationを介して宣言された元の値を効果的にオーバーライドして、処理されたリソースの場所を設定します。- 関連事項:
getLocations
@ContextConfigurationを介して宣言されたリソースの場所を取得します。メモ: これは変更可能なプロパティです。戻り値は、
@ContextConfigurationを介して宣言された元の値と一致しない処理された値を表す場合があります。- 戻り値:
- リソースの場所 ( 空の可能性があります )
- 関連事項:
hasLocations
public boolean hasLocations()このContextConfigurationAttributesインスタンスにパスベースのリソースの場所があるかどうかを確認します。- 戻り値:
-
locations配列が空でない場合はtrue - 関連事項:
hasResources
public boolean hasResources()このContextConfigurationAttributesインスタンスにパスベースのリソースの場所またはクラスベースのリソースがあるかどうかを確認します。isInheritLocations
public boolean isInheritLocations()@ContextConfigurationを介して宣言されたinheritLocationsフラグを取得します。- 戻り値:
inheritLocationsフラグ- 関連事項:
getInitializers
@ContextConfigurationを介して宣言されたApplicationContextInitializerクラスを取得します。- 戻り値:
ApplicationContextInitializerクラス- 導入:
- 3.2
isInheritInitializers
public boolean isInheritInitializers()@ContextConfigurationを介して宣言されたinheritInitializersフラグを取得します。- 戻り値:
inheritInitializersフラグ- 導入:
- 3.2
getName
@ContextConfigurationを介して宣言されたコンテキスト階層レベルの名前を取得します。- 戻り値:
- コンテキスト階層レベルの名前、または該当しない場合は
null - 導入:
- 3.2.2
- 関連事項:
getContextLoaderClass
@ContextConfigurationを介して宣言されたContextLoaderクラスを取得します。- 戻り値:
ContextLoaderクラス- 関連事項:
equals
指定されたオブジェクトがこのContextConfigurationAttributesインスタンスと等しいかどうかを、両方のオブジェクトの宣言クラス、場所、アノテーション付きクラス、inheritLocations フラグ、コンテキスト初期化クラス、inheritInitializers フラグ、およびContextLoader classを比較して判断します。hashCode
public int hashCode()名前を除く、このContextConfigurationAttributesインスタンスのすべてのプロパティの一意のハッシュコードを生成します。toString
コンテキスト構成属性と宣言クラスの String 表現を提供します。