Package org.springframework.xml.xpath
Class XPathExpressionFactoryBean
java.lang.Object
org.springframework.xml.xpath.XPathExpressionFactoryBean
- All Implemented Interfaces:
org.springframework.beans.factory.FactoryBean<XPathExpression>,org.springframework.beans.factory.InitializingBean
public class XPathExpressionFactoryBean
extends Object
implements org.springframework.beans.factory.FactoryBean<XPathExpression>, org.springframework.beans.factory.InitializingBean
Spring
FactoryBean for XPathExpression object. Facilitates injection of XPath expressions into
endpoint beans.
Uses XPathExpressionFactory underneath, so support is provided for JAXP 1.3, and Jaxen XPaths.
- Since:
- 1.0.0
- Author:
- Arjen Poutsma
- See Also:
-
Field Summary
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClass<? extends XPathExpression>booleanvoidsetExpression(String expression) Sets the XPath expression.voidsetNamespaces(Map<String, String> namespaces) Sets the namespaces for the expressions.
-
Constructor Details
-
XPathExpressionFactoryBean
public XPathExpressionFactoryBean()
-
-
Method Details
-
setExpression
Sets the XPath expression. Setting this property is required. -
setNamespaces
Sets the namespaces for the expressions. The given properties binds string prefixes to string namespaces. -
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
IllegalStateExceptionXPathParseException
-
getObject
- Specified by:
getObjectin interfaceorg.springframework.beans.factory.FactoryBean<XPathExpression>- Throws:
Exception
-
getObjectType
- Specified by:
getObjectTypein interfaceorg.springframework.beans.factory.FactoryBean<XPathExpression>
-
isSingleton
public boolean isSingleton()- Specified by:
isSingletonin interfaceorg.springframework.beans.factory.FactoryBean<XPathExpression>
-