public class BeanDefinitionParser extends org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
Constructor and Description |
---|
BeanDefinitionParser(Class<?> type,
boolean assignId)
Bean definition parser
|
Modifier and Type | Method and Description |
---|---|
protected void |
doParse(Element element,
org.springframework.beans.factory.support.BeanDefinitionBuilder builder) |
protected String |
extractPropertyName(String attributeName)
Extract a JavaBean property name from the supplied attribute name.
|
protected Class<?> |
getBeanClass(Element element) |
protected boolean |
isAssignId() |
protected boolean |
isEligibleAttribute(String attributeName) |
protected void |
postProcess(org.springframework.beans.factory.support.BeanDefinitionBuilder beanDefinition,
Element element)
Hook method that derived classes can implement to inspect/change a bean definition after parsing is complete.
|
doParse, getBeanClassName, getParentName, parseInternal
public BeanDefinitionParser(Class<?> type, boolean assignId)
type
- the type, can be nullassignId
- whether to allow assigning id from the id attribute on the type (there must be getter/setter id
on type class).protected Class<?> getBeanClass(Element element)
getBeanClass
in class org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
protected boolean isAssignId()
protected boolean isEligibleAttribute(String attributeName)
protected void doParse(Element element, org.springframework.beans.factory.support.BeanDefinitionBuilder builder)
doParse
in class org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
protected String extractPropertyName(String attributeName)
The default implementation uses the Conventions.attributeNameToPropertyName(String)
method to perform the
extraction.
The name returned must obey the standard JavaBean property name conventions. For example for a class with a
setter method 'setBingoHallFavourite(String)
', the name returned had better be
'bingoHallFavourite
' (with that exact casing).
attributeName
- the attribute name taken straight from the XML element being parsed (never
null
)null
)protected void postProcess(org.springframework.beans.factory.support.BeanDefinitionBuilder beanDefinition, Element element)
The default implementation does nothing.
beanDefinition
- the parsed (and probably totally defined) bean definition being builtelement
- the XML element that was the source of the bean definition's metadataApache Camel