File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
APIJSONORM/src/main/java/apijson Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ public class Log {
1414
1515 public static boolean DEBUG = true ;
1616
17- public static final String VERSION = "6.1.0 " ;
17+ public static final String VERSION = "6.2.1 " ;
1818 public static final String KEY_SYSTEM_INFO_DIVIDER = "\n ---|-----APIJSON SYSTEM INFO-----|---\n " ;
1919
2020 public static final String OS_NAME ;
Original file line number Diff line number Diff line change @@ -162,7 +162,22 @@ public AbstractFunctionParser setCurrentObject(@NotNull JSONObject currentObject
162162 * @param <T>
163163 */
164164 public <T extends Object > T getArgVal (String path ) {
165- return getArgVal (getCurrentObject (), path );
165+ return getArgVal (path , false );
166+ }
167+ /**根据路径取值
168+ * @param path
169+ * @param tryAll false-仅当前对象,true-本次请求的全局对象以及 Parser 缓存值
170+ * @return
171+ * @param <T>
172+ */
173+ public <T extends Object > T getArgVal (String path , boolean tryAll ) {
174+ T val = getArgVal (getCurrentObject (), path );
175+ if (tryAll == false || val != null ) {
176+ return val ;
177+ }
178+
179+ Parser <?> p = getParser ();
180+ return p == null ? null : (T ) p .getValueByPath (path );
166181 }
167182 /**根据路径从对象 obj 中取值
168183 * @param obj
You can’t perform that action at this time.
0 commit comments