Package org.dellroad.stuff.jibx
Class SpringParseUtil
java.lang.Object
org.dellroad.stuff.jibx.SpringParseUtil
JiBX parsing utility methods for Spring expressions.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Expression
deserializeExpression
(String string) Deserialize a SpringExpression
.static Expression
deserializeExpression
(String string, ParserContext context) Deserialize a SpringExpression
using the suppliedParserContext
.static Expression
deserializeTemplateExpression
(String string) Deserialize a SpringExpression
as a template expression.static String
Serialize a SpringExpression
.
-
Method Details
-
deserializeExpression
Deserialize a SpringExpression
. Equivalent to:SpringParseUtil.deserializeExpression(string, null);
- Parameters:
string
- encoded Spring expression- Returns:
- decoded expression
- Throws:
JiBXParseException
- if the parse fails- See Also:
-
deserializeTemplateExpression
Deserialize a SpringExpression
as a template expression. Equivalent to:SpringParseUtil.deserializeExpression(string, ParserContext.TEMPLATE_EXPRESSION);
- Parameters:
string
- expression string- Returns:
- decoded value
- Throws:
JiBXParseException
- if the parse fails- See Also:
-
deserializeExpression
public static Expression deserializeExpression(String string, ParserContext context) throws JiBXParseException Deserialize a SpringExpression
using the suppliedParserContext
.- Parameters:
string
- XML encoding created byserializeExpression(org.springframework.expression.Expression)
context
- parser context- Returns:
- decoded value
- Throws:
JiBXParseException
- if the parse fails- See Also:
-
serializeExpression
Serialize a SpringExpression
.Returns
expr.getExpressionString()
.- Parameters:
expr
- Spring expression- Returns:
- encoded value
- See Also:
-