File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
src/main/java/com/github/developframework/expression Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ public Expression[] expressionTree() {
48
48
* @param expressionValue 表达式字符串
49
49
* @return 表达式对象
50
50
*/
51
- public final static Expression parse (String expressionValue ) {
51
+ public static final Expression parse (String expressionValue ) {
52
52
if (StringUtils .isNotBlank (expressionValue )) {
53
53
if (expressionValue .contains ("." )) {
54
54
String [] expressionFragments = expressionValue .split ("\\ ." );
@@ -71,10 +71,23 @@ public final static Expression parse(String expressionValue) {
71
71
* @param singleExpressionValue 单项表达式字符串
72
72
* @return 单项表达式对象
73
73
*/
74
- private final static Expression parseSingle (String singleExpressionValue ) {
74
+ private static final Expression parseSingle (String singleExpressionValue ) {
75
75
if (ArrayExpression .isArrayExpression (singleExpressionValue )) {
76
76
return new ArrayExpression (singleExpressionValue );
77
77
}
78
78
return new ObjectExpression (singleExpressionValue );
79
79
}
80
+
81
+ /**
82
+ * 连接表达式
83
+ * @param parentExpression 父表达式对象
84
+ * @param childExpressionValue 子表达式字符串
85
+ * @return 新的表达式对象
86
+ */
87
+ public static final Expression concat (Expression parentExpression , String childExpressionValue ) {
88
+ Expression childExpression = parseSingle (childExpressionValue );
89
+ childExpression .setParentExpression (parentExpression );
90
+ return childExpression ;
91
+ }
92
+
80
93
}
You can’t perform that action at this time.
0 commit comments