程序包 org.xmeta.util

类 UtilAction


  • public class UtilAction
    extends Object
    • 构造器详细资料

      • UtilAction

        public UtilAction()
    • 方法详细资料

      • getActionCodeFilePath

        public static String getActionCodeFilePath​(Thing actionThing,
                                                   String ext)
        获取一个动作的代码文件名。
        参数:
        actionThing - 动作事物
        ext - 代码文件的后缀
        返回:
        文件名
      • putVarByActioScope

        public static void putVarByActioScope​(Thing action,
                                              String varName,
                                              Object var,
                                              ActionContext actionContext)
        把变量赋值到动作定义的变量范围中。
        参数:
        action - 动作事物
        varName - 变量名
        var - 变量值
        actionContext - 变量上下文
      • getVarScope

        public static Bindings getVarScope​(Thing action,
                                           ActionContext actionContext)
        获取变量范围。
        参数:
        action - 动作
        actionContext - 变量上下文
        返回:
        结果
      • getVarScope

        public static Bindings getVarScope​(String varScope,
                                           ActionContext actionContext)
        通过VarScope的字符串返回相应的Scope,如Gloabl, Local等。
        参数:
        varScope - 变量范围
        actionContext - 变量上下文
        返回:
        变量范围
      • getDebugLog

        public static boolean getDebugLog​(Thing actionThing,
                                          ActionContext actionContext)
        返回是否是打印调试日志。
        参数:
        actionThing - 动作事物
        actionContext - 变量上下文
        返回:
        是否
      • getReservedVars

        public static Bindings getReservedVars​(String reservedVars,
                                               ActionContext actionContext)
        从actionContext获取需要保留的变量。
        参数:
        reservedVars - 变量名,多个时使用英文逗号分隔
        actionContext -
        返回: