⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 staxreturnaction.java

📁 Software Testing Automation Framework (STAF)的开发代码
💻 JAVA
字号:
/*****************************************************************************//* Software Testing Automation Framework (STAF)                              *//* (C) Copyright IBM Corp. 2002                                              *//*                                                                           *//* This software is licensed under the Common Public License (CPL) V1.0.     *//*****************************************************************************/package com.ibm.staf.service.stax;import org.python.core.*;public class STAXReturnAction implements STAXAction{    public STAXReturnAction()    { /* Do Nothing */ }    public STAXReturnAction(String value)    {        fValue = value;    }    public String getValue() { return fValue; }     public void setValue(String value) { fValue = value; }    public String getXMLInfo()    {        return "<return>" + fValue + "</return>";    }    public String getInfo()    {        int valueLength = fValue.length();        if (valueLength > 40)            return fValue.substring(0, 40) + "...";        else            return fValue;    }    public String getDetails()    {        return "Value:" + fValue;    }    public void execute(STAXThread thread)    {         if (fValue.equals(null))        {            fValue = "None";        }        thread.popAction();        PyObject result = null;        try        {            result = thread.pyObjectEval(fValue);            thread.addCondition(new STAXReturnCondition(result));        }        catch (STAXPythonEvaluationException e)        {            thread.pySetVar("STAXResult", Py.None);            thread.setSignalMsgVar("STAXPythonEvalMsg", getXMLInfo(), e);            thread.raiseSignal("STAXPythonEvaluationError");        }    }    public void handleCondition(STAXThread thread, STAXCondition cond)    {        thread.popAction();    }    public STAXAction cloneAction()    {        STAXReturnAction clone = new STAXReturnAction(fValue);        return clone;    }    private String fValue = "None";}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -