Package org.ldaptive.beans.spring.parser
Class AbstractBeanDefinitionParser
- java.lang.Object
-
- org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
-
- org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
-
- org.ldaptive.beans.spring.parser.AbstractBeanDefinitionParser
-
- All Implemented Interfaces:
org.springframework.beans.factory.xml.BeanDefinitionParser
- Direct Known Subclasses:
AbstractConnectionConfigBeanDefinitionParser,SearchExecutorBeanDefinitionParser
public abstract class AbstractBeanDefinitionParser extends org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParserCommon implementation for all bean definition parsers
-
-
Constructor Summary
Constructors Constructor Description AbstractBeanDefinitionParser()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static ElementgetDirectChild(Element parent, String... names)Returns the first direct child element of the parent element with a name that matches any of the supplied names.protected static DurationparseDuration(String value)Returns aDurationfor the supplied value.protected static PeriodparsePeriod(String value)Returns aPeriodfor the supplied value.protected voidsetIfPresent(Element element, String attribute, String property, org.springframework.beans.factory.support.BeanDefinitionBuilder builder)Sets a property if the given attribute exists on the element.protected voidsetIfPresent(Element element, String attribute, org.springframework.beans.factory.support.BeanDefinitionBuilder builder)Sets a property if the given attribute exists on the element.-
Methods inherited from class org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
doParse, doParse, getBeanClass, getBeanClassName, getParentName, parseInternal
-
-
-
-
Field Detail
-
logger
protected final Logger logger
Logger for this class.
-
-
Method Detail
-
parsePeriod
protected static Period parsePeriod(String value)
Returns aPeriodfor the supplied value.- Parameters:
value- to parse- Returns:
- period
-
parseDuration
protected static Duration parseDuration(String value)
Returns aDurationfor the supplied value.- Parameters:
value- to parse- Returns:
- duration
-
getDirectChild
protected static Element getDirectChild(Element parent, String... names)
Returns the first direct child element of the parent element with a name that matches any of the supplied names.- Parameters:
parent- element to inspectnames- local names of the element to return- Returns:
- child element or null
-
setIfPresent
protected void setIfPresent(Element element, String attribute, org.springframework.beans.factory.support.BeanDefinitionBuilder builder)
Sets a property if the given attribute exists on the element. The property name used is the same as the attribute name.- Parameters:
element- from which to obtain propertyattribute- value for obtaining propertybuilder- to receive property
-
setIfPresent
protected void setIfPresent(Element element, String attribute, String property, org.springframework.beans.factory.support.BeanDefinitionBuilder builder)
Sets a property if the given attribute exists on the element.- Parameters:
element- from which to obtain propertyproperty- to setattribute- value for obtaining propertybuilder- to receive property
-
-