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 {
14
14
15
15
public static boolean DEBUG = true ;
16
16
17
- public static final String VERSION = "6.1.0 " ;
17
+ public static final String VERSION = "6.2.1 " ;
18
18
public static final String KEY_SYSTEM_INFO_DIVIDER = "\n ---|-----APIJSON SYSTEM INFO-----|---\n " ;
19
19
20
20
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
162
162
* @param <T>
163
163
*/
164
164
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 );
166
181
}
167
182
/**根据路径从对象 obj 中取值
168
183
* @param obj
You can’t perform that action at this time.
0 commit comments