クラス NamespaceUtils
- java.lang.ObjectSE
-
- org.springframework.amqp.rabbit.config.NamespaceUtils
public abstract class NamespaceUtils extends ObjectSE
名前空間パーサーの共有ユーティリティメソッド。- 作成者:
- Mark Pollack, Dave Syer, Gary Russell
フィールドのサマリー
フィールド 修飾子と型 フィールド 説明 static StringSEBASE_PACKAGEstatic StringSEMETHOD_ATTRIBUTEstatic StringSEORDERstatic StringSEREF_ATTRIBUTE
コンストラクターの概要
コンストラクター コンストラクター 説明 NamespaceUtils()
メソッドのサマリー
すべてのメソッド 静的メソッド 具象メソッド 修飾子と型 メソッド 説明 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 BeanDefinitioncreateExpressionDefIfAttributeDefined(StringSE expressionElementName, ElementSE element)static 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 定義プロパティに、指定された要素で属性が定義されている場合に、指定された名前の属性の値を取り込みます。
メソッドの詳細
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。
- 関連事項:
Conventions.attributeNameToPropertyName(String)
isAttributeDefined
public static boolean isAttributeDefined(ElementSE element, StringSE attributeName)
属性をチェックして、指定された要素で定義されているかどうかを確認します。- パラメーター:
element- 属性を定義する必要がある XML 要素attributeName- 値がコンストラクター引数として使用される属性の名前- 戻り値:
- 定義されている場合は true。
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。
- 関連事項:
Conventions.attributeNameToPropertyName(String)
createElementDescription
public static StringSE createElementDescription(ElementSE element)
ノード名に基づいて要素のわかりやすい説明を提供します。使用可能な場合は、"id" 属性値も提供します。これは、Bean 定義パーサー内からエラーメッセージを作成できます。- パラメーター:
element- 要素。- 戻り値:
- 説明。
parseDeclarationControls
public static void parseDeclarationControls(ElementSE element, BeanDefinitionBuilder builder)
"auto-declare" および "declared-by" 属性を解析します。- パラメーター:
element- 要素。builder- ビルダー。
createExpressionDefinitionFromValueOrExpression
public static BeanDefinition createExpressionDefinitionFromValueOrExpression(StringSE valueElementName, StringSE expressionElementName, ParserContext parserContext, ElementSE element, boolean oneRequired)
createExpressionDefIfAttributeDefined
public static BeanDefinition createExpressionDefIfAttributeDefined(StringSE expressionElementName, ElementSE element)