本文整理汇总了Java中org.springframework.beans.factory.xml.BeanDefinitionParser.parse方法的典型用法代码示例。如果您正苦于以下问题:Java BeanDefinitionParser.parse方法的具体用法?Java BeanDefinitionParser.parse怎么用?Java BeanDefinitionParser.parse使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.springframework.beans.factory.xml.BeanDefinitionParser
的用法示例。
在下文中一共展示了BeanDefinitionParser.parse方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: parseListElement
import org.springframework.beans.factory.xml.BeanDefinitionParser; //导入方法依赖的package包/类
private void parseListElement(Element ele, ParserContext parserContext) {
BeanDefinitionParser parser = new BlueprintCollectionBeanDefinitionParser() {
@Override
protected CollectionType collectionType() {
return CollectionType.LIST;
}
};
parser.parse(ele, parserContext);
}
示例2: parseSetElement
import org.springframework.beans.factory.xml.BeanDefinitionParser; //导入方法依赖的package包/类
private void parseSetElement(Element ele, ParserContext parserContext) {
BeanDefinitionParser parser = new BlueprintCollectionBeanDefinitionParser() {
@Override
protected CollectionType collectionType() {
return CollectionType.SET;
}
};
parser.parse(ele, parserContext);
}
示例3: parseTestStepComponents
import org.springframework.beans.factory.xml.BeanDefinitionParser; //导入方法依赖的package包/类
private static void parseTestStepComponents(List<Element> childElements,
BeanDefinition beanDef, ParserContext parserContext) {
ManagedList<BeanDefinition> children = new ManagedList<BeanDefinition>(//NOPMD
childElements.size());
for (Element element : childElements) {
BeanDefinitionParser bep = XsdNameSpaceParserRegistry.getNameSpaceHandlerRegistry().get(element.getLocalName());
if (null == bep) throw GlobalUtils.createNotInitializedException("Name space handler not registered for this element: " + element.getTagName());
BeanDefinition tmpBDef = bep.parse(element, parserContext);
tmpBDef.getPropertyValues().removePropertyValue(tmpBDef.getPropertyValues().getPropertyValue(XsdElementConstants.MEMBER_BASETESTSTEP_TESTCASE));
children.add(tmpBDef);
// if (element.getTagName() == "ate:" //NOPMD
// + XsdElementConstants.ELEMENT_HOMESTEP) {
// HomeStepBeanDefinitionParser homeStep = new HomeStepBeanDefinitionParser();
// BeanDefinition tmpBDef = homeStep.parse(element, parserContext);
// tmpBDef.getPropertyValues().removePropertyValue(tmpBDef.getPropertyValues().getPropertyValue(XsdElementConstants.MEMBER_BASETESTSTEP_TESTCASE));
//
// children.add(tmpBDef);
// } else if (element.getTagName() == "ate:"
// + XsdElementConstants.ELEMENT_ELEMENTSTEP) {
// ElementStepBeanDefinitionParser elementStep = new ElementStepBeanDefinitionParser();
// BeanDefinition tmpBDef = elementStep.parse(element, parserContext);
// tmpBDef.getPropertyValues().removePropertyValue(tmpBDef.getPropertyValues().getPropertyValue(XsdElementConstants.MEMBER_BASETESTSTEP_TESTCASE));
//
// children.add(tmpBDef);
// } else if (element.getTagName() == "ate:"
// + XsdElementConstants.ELEMENT_LASTSTEP) {
// LastStepBeanDefinitionParser lastStep = new LastStepBeanDefinitionParser();
// BeanDefinition tmpBDef = lastStep.parse(element, parserContext);
// tmpBDef.getPropertyValues().removePropertyValue(tmpBDef.getPropertyValues().getPropertyValue(XsdElementConstants.MEMBER_BASETESTSTEP_TESTCASE));
//
// children.add(tmpBDef);
//
// }
}
beanDef.getPropertyValues().addPropertyValue(
XsdElementConstants.MEMBER_STEPTYPESERVICE_STEPSET, children);
}
示例4: parseAsserterComponents
import org.springframework.beans.factory.xml.BeanDefinitionParser; //导入方法依赖的package包/类
private static void parseAsserterComponents(List<Element> childElements,
BeanDefinition beanDef, ParserContext parserContext) {
ManagedList<BeanDefinition> children = new ManagedList<BeanDefinition>(//NOPMD
childElements.size());
for (Element element : childElements) {
BeanDefinitionParser bep = XsdNameSpaceParserRegistry.getNameSpaceHandlerRegistry().get(element.getLocalName());
if (null == bep) throw GlobalUtils.createNotInitializedException("Name space handler not registered for this element: " + element.getTagName());
BeanDefinition tmpBDef = bep.parse(element, parserContext);
children.add(tmpBDef);
}
beanDef.getPropertyValues().addPropertyValue(
"expectedResultAsserter", children);
}
示例5: parseReferenceElement
import org.springframework.beans.factory.xml.BeanDefinitionParser; //导入方法依赖的package包/类
private void parseReferenceElement(Element ele, ParserContext parserContext) {
BeanDefinitionParser parser = new BlueprintReferenceBeanDefinitionParser();
parser.parse(ele, parserContext);
}
示例6: parseServiceElement
import org.springframework.beans.factory.xml.BeanDefinitionParser; //导入方法依赖的package包/类
private void parseServiceElement(Element ele, ParserContext parserContext) {
BeanDefinitionParser parser = new BlueprintServiceDefinitionParser();
parser.parse(ele, parserContext);
}
示例7: parseConvertersElement
import org.springframework.beans.factory.xml.BeanDefinitionParser; //导入方法依赖的package包/类
/**
* Parses a <type-converters>.
*
* @param ele
* @param parserContext
*/
protected void parseConvertersElement(Element ele, ParserContext parserContext) {
BeanDefinitionParser parser = new TypeConverterBeanDefinitionParser();
parser.parse(ele, parserContext);
}