クラス NamespaceUtils
java.lang.ObjectSE
org.springframework.amqp.rabbit.config.NamespaceUtils
名前空間パーサーの共有ユーティリティメソッド。
- 作成者:
- Mark Pollack, Dave Syer, Gary Russell, Ngoc Nhan
フィールドのサマリー
フィールドコンストラクターの概要
コンストラクターメソッドのサマリー
修飾子と型メソッド説明static voidaddConstructorArgBooleanValueIfAttributeDefined(BeanDefinitionBuilder builder, ElementSE element, StringSE attributeName, boolean defaultValue) Bean 定義コンストラクター引数に、その属性が指定された要素で定義されている場合、または指定されたデフォルトを使用する場合、その属性のブール値を入力します。static booleanaddConstructorArgParentRefIfAttributeDefined(BeanDefinitionBuilder builder, ElementSE element, StringSE attributeName) 指定された要素で定義されている場合、属性と等しい親 ID を持つ Bean への参照を使用して、Bean 定義コンストラクター引数を設定します。static booleanaddConstructorArgRefIfAttributeDefined(BeanDefinitionBuilder builder, ElementSE element, StringSE attributeName) 指定された要素で属性が定義されている場合、属性と等しい id を持つ Bean への参照を使用して、Bean 定義コンストラクター引数を設定します。static booleanaddConstructorArgValueIfAttributeDefined(BeanDefinitionBuilder builder, ElementSE element, StringSE attributeName) 指定された要素で定義されている場合、Bean 定義コンストラクター引数にその属性の値を入力します。static StringSEcreateElementDescription(ElementSE element) ノード名と、使用可能な場合は "id" 属性 値に基づいて、要素のユーザーフレンドリな説明を提供します。static @Nullable BeanDefinitioncreateExpressionDefIfAttributeDefined(StringSE expressionElementName, ElementSE element) static @Nullable BeanDefinitioncreateExpressionDefinitionFromValueOrExpression(StringSE valueElementName, StringSE expressionElementName, ParserContext parserContext, ElementSE element, boolean oneRequired) static booleanisAttributeDefined(ElementSE element, StringSE attributeName) 属性をチェックして、指定された要素で定義されているかどうかを確認します。static voidparseDeclarationControls(ElementSE element, BeanDefinitionBuilder builder) "auto-declare" および "declared-by" 属性を解析します。static booleansetReferenceIfAttributeDefined(BeanDefinitionBuilder builder, ElementSE element, StringSE attributeName) 指定された要素で属性が定義されている場合、指定された attributeName に対応する Bean 定義プロパティに、その属性の値によって識別される Bean への参照を設定します。static booleansetReferenceIfAttributeDefined(BeanDefinitionBuilder builder, ElementSE element, StringSE attributeName, StringSE propertyName) 指定された Bean 定義プロパティに Bean への参照を設定します。static booleansetValueIfAttributeDefined(BeanDefinitionBuilder builder, ElementSE element, StringSE attributeName) 指定された要素で定義されている場合、指定された attributeName に対応する Bean 定義プロパティにその属性の値を設定します。static booleansetValueIfAttributeDefined(BeanDefinitionBuilder builder, ElementSE element, StringSE attributeName, StringSE propertyName) 指定された Bean 定義プロパティに、指定された要素で属性が定義されている場合に、指定された名前の属性の値を取り込みます。
フィールドの詳細
BASE_PACKAGE
- 関連事項:
REF_ATTRIBUTE
- 関連事項:
METHOD_ATTRIBUTE
- 関連事項:
ORDER
- 関連事項:
コンストラクターの詳細
NamespaceUtils
public NamespaceUtils()
メソッドの詳細
setValueIfAttributeDefined
public static boolean setValueIfAttributeDefined(BeanDefinitionBuilder builder, ElementSE element, StringSE attributeName, StringSE propertyName) 指定された Bean 定義プロパティに、指定された要素で属性が定義されている場合に、指定された名前の属性の値を取り込みます。- パラメーター:
builder- 構成する Bean 定義ビルダーelement- 属性を定義する必要がある XML 要素attributeName- プロパティの入力に使用される値を持つ属性の名前propertyName- 設定するプロパティの名前- 戻り値:
- 定義されている場合は true。
setValueIfAttributeDefined
public static boolean setValueIfAttributeDefined(BeanDefinitionBuilder builder, ElementSE element, StringSE attributeName) 指定された要素で定義されている場合、指定された attributeName に対応する Bean 定義プロパティにその属性の値を設定します。プロパティ名は、小文字のハイフンで区切られた属性のキャメルケース相当になります (たとえば、"foo-bar" 属性 は "fooBar" プロパティと一致します)。
- パラメーター:
builder- 構成する Bean 定義ビルダーelement- 属性を定義する必要がある XML 要素attributeName- プロパティに値が設定される属性の名前- 戻り値:
- 定義されている場合は true。
- 関連事項:
isAttributeDefined
addConstructorArgValueIfAttributeDefined
public static boolean addConstructorArgValueIfAttributeDefined(BeanDefinitionBuilder builder, ElementSE element, StringSE attributeName) 指定された要素で定義されている場合、Bean 定義コンストラクター引数にその属性の値を入力します。- パラメーター:
builder- 構成する Bean 定義ビルダーelement- 属性を定義する必要がある XML 要素attributeName- 値がコンストラクター引数として使用される属性の名前- 戻り値:
- 定義されている場合は true。
addConstructorArgBooleanValueIfAttributeDefined
public static void addConstructorArgBooleanValueIfAttributeDefined(BeanDefinitionBuilder builder, ElementSE element, StringSE attributeName, boolean defaultValue) Bean 定義コンストラクター引数に、その属性が指定された要素で定義されている場合、または指定されたデフォルトを使用する場合、その属性のブール値を入力します。- パラメーター:
builder- 構成する Bean 定義ビルダーelement- 属性を定義する必要がある XML 要素attributeName- 値がコンストラクター引数として使用される属性の名前defaultValue- 属性が設定されていない場合に使用するデフォルト値
addConstructorArgRefIfAttributeDefined
public static boolean addConstructorArgRefIfAttributeDefined(BeanDefinitionBuilder builder, ElementSE element, StringSE attributeName) 指定された要素で属性が定義されている場合、属性と等しい id を持つ Bean への参照を使用して、Bean 定義コンストラクター引数を設定します。- パラメーター:
builder- 構成する Bean 定義ビルダーelement- 属性を定義する必要がある XML 要素attributeName- 参照を設定するために値が使用される属性の名前- 戻り値:
- 定義されている場合は true。
addConstructorArgParentRefIfAttributeDefined
public static boolean addConstructorArgParentRefIfAttributeDefined(BeanDefinitionBuilder builder, ElementSE element, StringSE attributeName) 指定された要素で定義されている場合、属性と等しい親 ID を持つ Bean への参照を使用して、Bean 定義コンストラクター引数を設定します。- パラメーター:
builder- 構成する Bean 定義ビルダーelement- 属性を定義する必要がある XML 要素attributeName- 参照を設定するために値が使用される属性の名前- 戻り値:
- 定義されている場合は true。
setReferenceIfAttributeDefined
public static boolean setReferenceIfAttributeDefined(BeanDefinitionBuilder builder, ElementSE element, StringSE attributeName, StringSE propertyName) 指定された Bean 定義プロパティに Bean への参照を設定します。Bean 参照は、その属性が特定の要素で定義されている場合、その名前が提供されている属性の値によって識別されます。- パラメーター:
builder- 構成する Bean 定義ビルダーelement- 属性を定義する必要がある XML 要素attributeName- プロパティを設定するための Bean 参照として使用される値を持つ属性の名前propertyName- 設定するプロパティの名前- 戻り値:
- 属性が存在し、テキストがある場合は true
setReferenceIfAttributeDefined
public static boolean setReferenceIfAttributeDefined(BeanDefinitionBuilder builder, ElementSE element, StringSE attributeName) 指定された要素で属性が定義されている場合、指定された attributeName に対応する Bean 定義プロパティに、その属性の値によって識別される Bean への参照を設定します。プロパティ名は、小文字のハイフンで区切られた属性のキャメルケース相当になります (たとえば、"foo-bar" 属性 は "fooBar" プロパティと一致します)。
- パラメーター:
builder- 構成する Bean 定義ビルダーelement- 属性を定義する必要がある XML 要素attributeName- プロパティを設定するための Bean 参照として使用される値を持つ属性の名前- 戻り値:
- 定義されている場合は true。
- 関連事項:
createElementDescription
parseDeclarationControls
"auto-declare" および "declared-by" 属性を解析します。- パラメーター:
element- 要素。builder- ビルダー。
createExpressionDefinitionFromValueOrExpression
public static @Nullable BeanDefinition createExpressionDefinitionFromValueOrExpression(StringSE valueElementName, StringSE expressionElementName, ParserContext parserContext, ElementSE element, boolean oneRequired) createExpressionDefIfAttributeDefined
public static @Nullable BeanDefinition createExpressionDefIfAttributeDefined(StringSE expressionElementName, ElementSE element)