File tree Expand file tree Collapse file tree
src/main/java/com/github/developframework/expression Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ public Expression[] expressionTree() {
4848 * @param expressionValue 表达式字符串
4949 * @return 表达式对象
5050 */
51- public final static Expression parse (String expressionValue ) {
51+ public static final Expression parse (String expressionValue ) {
5252 if (StringUtils .isNotBlank (expressionValue )) {
5353 if (expressionValue .contains ("." )) {
5454 String [] expressionFragments = expressionValue .split ("\\ ." );
@@ -71,10 +71,23 @@ public final static Expression parse(String expressionValue) {
7171 * @param singleExpressionValue 单项表达式字符串
7272 * @return 单项表达式对象
7373 */
74- private final static Expression parseSingle (String singleExpressionValue ) {
74+ private static final Expression parseSingle (String singleExpressionValue ) {
7575 if (ArrayExpression .isArrayExpression (singleExpressionValue )) {
7676 return new ArrayExpression (singleExpressionValue );
7777 }
7878 return new ObjectExpression (singleExpressionValue );
7979 }
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+
8093}
You can’t perform that action at this time.
0 commit comments