public class EacElementDefinitionParser
extends org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
Constructor and Description |
---|
EacElementDefinitionParser() |
Modifier and Type | Method and Description |
---|---|
protected void |
doParse(Element element,
org.springframework.beans.factory.support.BeanDefinitionBuilder bean)
Does the parsing of the element, and inserts information
about the element into the passed BeanDefinitionBuilder.
|
protected Class<?> |
getBeanClass(Element element) |
String[] |
getCustomAttrs() |
String[] |
getCustomBeanReferenceAttrs() |
String[] |
getCustomElements() |
String[] |
getCustomListElements() |
String |
getId() |
boolean |
getIsAbstract() |
String |
getParentBeanId() |
boolean |
isElementIdApplicable() |
protected void |
parseArgElements(String elemName,
Element element,
org.springframework.beans.factory.support.BeanDefinitionBuilder bean)
Element parsing method for multi-assign elements, which
are passed using a List (e.g.
|
protected void |
parseAttributes(String[] attributeNames,
Element element,
org.springframework.beans.factory.support.BeanDefinitionBuilder bean)
Parses attributes from an element, setting them as properties in a bean
definition builder.
|
protected void |
parseAttributesAsBeanReferences(String[] attributeNames,
Element element,
org.springframework.beans.factory.support.BeanDefinitionBuilder bean)
Parses attributes from an element, setting them as bean references in a bean
definition builder.
|
protected void |
parseAttributesAsBeanReferences(String attributeName,
String propertyName,
Element element,
org.springframework.beans.factory.support.BeanDefinitionBuilder bean)
Parses attributes from an element, setting them as bean references in a bean
definition builder.
|
protected void |
parseChildElementReferences(String elemName,
Element element,
org.springframework.beans.factory.support.BeanDefinitionBuilder bean)
Element parsing method for child elements containing object references.
|
protected void |
parseChildElements(String elemName,
Element element,
org.springframework.beans.factory.support.BeanDefinitionBuilder bean)
Element parsing method for child elements.
|
protected void |
parseClasspath(Element element,
org.springframework.beans.factory.support.BeanDefinitionBuilder bean)
Element parsing method for multi-assign elements, which
are passed using a List (e.g.
|
protected void |
parseElements(String[] elementNames,
Element element,
org.springframework.beans.factory.support.BeanDefinitionBuilder bean)
Parses child elements from an element, setting them as properties in a bean
definition builder.
|
protected org.springframework.beans.factory.support.AbstractBeanDefinition |
parseInternal(Element element,
org.springframework.beans.factory.xml.ParserContext parserContext)
Creates a
BeanDefinitionBuilder instance for the
bean Class and passes it to the
doParse(org.w3c.dom.Element, org.springframework.beans.factory.support.BeanDefinitionBuilder) strategy method. |
protected void |
parseListElements(String listName,
String elemName,
Element element,
org.springframework.beans.factory.support.BeanDefinitionBuilder bean)
Element parsing method for multi-assign elements, which
are passed using a List
|
protected void |
parsePropertyElements(String elemName,
Element element,
org.springframework.beans.factory.support.BeanDefinitionBuilder bean)
Element parsing method for multi-assign elements that
are passed using a Map (e.g.
|
protected void |
parsePropertyElements(String elemName,
Element element,
org.springframework.beans.factory.support.BeanDefinitionBuilder bean,
boolean mapType)
Element parsing method for elements using
|
protected String |
resolveId(Element element,
org.springframework.beans.factory.support.AbstractBeanDefinition definition,
org.springframework.beans.factory.xml.ParserContext parserContext)
Resolve the ID for the supplied
BeanDefinition . |
void |
setBeanClass(Class<?> newClass) |
void |
setCustomAttrs(String[] attrs) |
void |
setCustomBeanReferenceAttrs(String[] customBeanReferenceAttrs) |
void |
setCustomElements(String[] elems) |
void |
setCustomListElements(String[] customListElements) |
void |
setElementIdApplicable(boolean applicable) |
void |
setId(String ID) |
void |
setIsAbstract(boolean ab) |
void |
setParentBeanId(String parent) |
public void setId(String ID)
public String getId()
public void setParentBeanId(String parent)
public String getParentBeanId()
public void setElementIdApplicable(boolean applicable)
public boolean isElementIdApplicable()
public void setBeanClass(Class<?> newClass)
public void setIsAbstract(boolean ab)
public boolean getIsAbstract()
public void setCustomAttrs(String[] attrs)
public String[] getCustomAttrs()
public void setCustomElements(String[] elems)
public String[] getCustomElements()
public String[] getCustomListElements()
public void setCustomListElements(String[] customListElements)
public String[] getCustomBeanReferenceAttrs()
public void setCustomBeanReferenceAttrs(String[] customBeanReferenceAttrs)
protected org.springframework.beans.factory.support.AbstractBeanDefinition parseInternal(Element element, org.springframework.beans.factory.xml.ParserContext parserContext)
BeanDefinitionBuilder
instance for the
bean Class
and passes it to the
doParse(org.w3c.dom.Element, org.springframework.beans.factory.support.BeanDefinitionBuilder)
strategy method.parseInternal
in class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
element
- the element that is to be parsed into a single BeanDefinitionparserContext
- the object encapsulating the current state of the parsing processElement
IllegalStateException
- if the bean Class
returned from
getBeanClass(org.w3c.dom.Element)
is null
doParse(org.w3c.dom.Element, org.springframework.beans.factory.support.BeanDefinitionBuilder)
protected void doParse(Element element, org.springframework.beans.factory.support.BeanDefinitionBuilder bean)
protected void parseAttributes(String[] attributeNames, Element element, org.springframework.beans.factory.support.BeanDefinitionBuilder bean)
attributeNames
- Array of attribute names to parse from the element.element
- Element to parse.bean
- BeanDefinitionBuilder to which parsed properties are added.protected void parseAttributesAsBeanReferences(String[] attributeNames, Element element, org.springframework.beans.factory.support.BeanDefinitionBuilder bean)
attributeNames
- Array of attribute names to parse from the element.element
- Element to parse.bean
- BeanDefinitionBuilder to which parsed properties are added.protected void parseAttributesAsBeanReferences(String attributeName, String propertyName, Element element, org.springframework.beans.factory.support.BeanDefinitionBuilder bean)
attributeName
- Array of attribute names to parse from the element.element
- Element to parse.bean
- BeanDefinitionBuilder to which parsed properties are added.protected void parseElements(String[] elementNames, Element element, org.springframework.beans.factory.support.BeanDefinitionBuilder bean)
elementNames
- Array of element names to parse from the element.element
- Element to parse.bean
- BeanDefinitionBuilder to which parsed properties are added.protected void parsePropertyElements(String elemName, Element element, org.springframework.beans.factory.support.BeanDefinitionBuilder bean)
elemName
- Name of the child element to parse.element
- Element to parsebean
- BeanDefinitionBuilder to which parsed properties are added.protected void parsePropertyElements(String elemName, Element element, org.springframework.beans.factory.support.BeanDefinitionBuilder bean, boolean mapType)
elemName
- Name of the child element to parse.element
- Element to parsebean
- BeanDefinitionBuilder to which parsed properties are added.mapType
- Boolean value to identify whether protected void parseArgElements(String elemName, Element element, org.springframework.beans.factory.support.BeanDefinitionBuilder bean)
elemName
- Name of the child element to parse.element
- Element to parsebean
- BeanDefinitionBuilder to which parsed properties are added.protected void parseClasspath(Element element, org.springframework.beans.factory.support.BeanDefinitionBuilder bean)
element
- Element to parsebean
- BeanDefinitionBuilder to which parsed properties are added.protected void parseListElements(String listName, String elemName, Element element, org.springframework.beans.factory.support.BeanDefinitionBuilder bean)
listName
- Name of the parent element to parse.elemName
- Name of the child element to parse.element
- Element to parsebean
- BeanDefinitionBuilder to which parsed properties are added.protected void parseChildElements(String elemName, Element element, org.springframework.beans.factory.support.BeanDefinitionBuilder bean)
element
- Element to parsebean
- BeanDefinitionBuilder to which parsed child object references are added.protected void parseChildElementReferences(String elemName, Element element, org.springframework.beans.factory.support.BeanDefinitionBuilder bean)
elemName
- Name of the child element to parseelement
- Element to parsebean
- BeanDefinitionBuilder to which parsed child object references are added.protected String resolveId(Element element, org.springframework.beans.factory.support.AbstractBeanDefinition definition, org.springframework.beans.factory.xml.ParserContext parserContext) throws org.springframework.beans.factory.BeanDefinitionStoreException
BeanDefinition
.
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 org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
element
- 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 BeanDefinitionRegistry
org.springframework.beans.factory.BeanDefinitionStoreException
- if no unique name could be generated
for the given bean definitionCopyright © 2017, Oracle and/or its affiliates. All rights reserved.