public final class OgnlHelper extends Object
Modifier and Type | Method and Description |
---|---|
static boolean |
isInvalidValidOgnlExpression(String expression) |
static boolean |
isNullSafeOperator(String ognlExpression)
Tests whether or not the given Camel OGNL expression is using the null safe operator or not.
|
static KeyValueHolder<String,String> |
isOgnlIndex(String ognlExpression) |
static boolean |
isValidOgnlExpression(String expression)
Tests whether or not the given String is a Camel OGNL expression.
|
static String |
removeLeadingOperators(String ognlExpression)
Removes any leading operators from the Camel OGNL expression.
|
static String |
removeOperators(String ognlExpression) |
static String |
removeTrailingOperators(String ognlExpression)
Removes any trailing operators from the Camel OGNL expression.
|
static List<String> |
splitOgnl(String ognl)
Regular expression with repeating groups is a pain to get right
and then nobody understands the reg exp afterwards.
|
static void |
validateMethodName(String method)
Validates whether the method name is using valid java identifiers in the name
Will throw
IllegalArgumentException if the method name is invalid. |
public static boolean isValidOgnlExpression(String expression)
expression
- the Stringpublic static boolean isInvalidValidOgnlExpression(String expression)
public static void validateMethodName(String method)
IllegalArgumentException
if the method name is invalid.public static boolean isNullSafeOperator(String ognlExpression)
ognlExpression
- the Camel OGNL expressionpublic static String removeLeadingOperators(String ognlExpression)
ognlExpression
- the Camel OGNL expressionpublic static String removeTrailingOperators(String ognlExpression)
ognlExpression
- the Camel OGNL expressionpublic static String removeOperators(String ognlExpression)
public static KeyValueHolder<String,String> isOgnlIndex(String ognlExpression)
public static List<String> splitOgnl(String ognl)
ognl
- the ognl expressionIllegalArgumentException
- if the last method has a missing ending parenthesisApache Camel