public class ScriptTemplateConfigurerBeanDefinitionParser extends AbstractSimpleBeanDefinitionParser
<mvc:script-template-configurer> MVC namespace element and
register a ScriptTemplateConfigurer bean.| Modifier and Type | Field and Description |
|---|---|
static String |
BEAN_NAME
The bean name used for the
ScriptTemplateConfigurer. |
ID_ATTRIBUTE, NAME_ATTRIBUTE| Constructor and Description |
|---|
ScriptTemplateConfigurerBeanDefinitionParser() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doParse(Element element,
ParserContext parserContext,
BeanDefinitionBuilder builder)
Parse the supplied
Element and populate the supplied
BeanDefinitionBuilder as required. |
protected String |
getBeanClassName(Element element)
Determine the bean class name corresponding to the supplied
Element. |
protected boolean |
isEligibleAttribute(String name)
Determine whether the given attribute is eligible for being
turned into a corresponding bean property value.
|
protected String |
resolveId(Element element,
AbstractBeanDefinition definition,
ParserContext parserContext)
Resolve the ID for the supplied
BeanDefinition. |
extractPropertyName, isEligibleAttribute, postProcessdoParse, getBeanClass, getParentName, parseInternalparse, postProcessComponentDefinition, registerBeanDefinition, shouldFireEvents, shouldGenerateId, shouldGenerateIdAsFallback, shouldParseNameAsAliasespublic static final String BEAN_NAME
ScriptTemplateConfigurer.public ScriptTemplateConfigurerBeanDefinitionParser()
protected String resolveId(Element element, AbstractBeanDefinition definition, ParserContext parserContext)
AbstractBeanDefinitionParserBeanDefinition.
When using generation, a name is generated automatically.
Otherwise, the ID is extracted from the "id" attribute, potentially with a
fallback to a generated id.
resolveId in class AbstractBeanDefinitionParserelement - the element that the bean definition has been built fromdefinition - the bean definition to be registeredparserContext - the object encapsulating the current state of the parsing process;
provides access to a BeanDefinitionRegistryprotected String getBeanClassName(Element element)
AbstractSingleBeanDefinitionParserElement.getBeanClassName in class AbstractSingleBeanDefinitionParserelement - the Element that is being parsedElement, or null if noneAbstractSingleBeanDefinitionParser.getBeanClass(org.w3c.dom.Element)protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder)
AbstractSimpleBeanDefinitionParserElement and populate the supplied
BeanDefinitionBuilder as required.
This implementation maps any attributes present on the
supplied element to PropertyValue
instances, and
adds them
to the
builder.
The AbstractSimpleBeanDefinitionParser.extractPropertyName(String) method is used to
reconcile the name of an attribute with the name of a JavaBean
property.
doParse in class AbstractSimpleBeanDefinitionParserelement - the XML element being parsedparserContext - the object encapsulating the current state of the parsing processbuilder - used to define the BeanDefinitionAbstractSimpleBeanDefinitionParser.extractPropertyName(String)protected boolean isEligibleAttribute(String name)
AbstractSimpleBeanDefinitionParserThe default implementation considers any attribute as eligible, except for the "id" attribute.
isEligibleAttribute in class AbstractSimpleBeanDefinitionParsername - the attribute name taken straight from the
XML element being parsed (never null)