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

📄 staxsequenceaction.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 java.util.ArrayList;public class STAXSequenceAction implements STAXAction{    static final int CALLING_ACTIONS = 0;    static final int COMPLETE = 1;    static final String CALLING_ACTIONS_STRING = "CALLING_ACTIONS";    static final String COMPLETE_STRING = "COMPLETE";    static final String STATE_UNKNOWN_STRING = "UNKNOWN";    private STAXSequenceAction()    { /* Do Nothing */ }    public STAXSequenceAction(ArrayList actionList)    {        fActionList = actionList;    }    public String getStateAsString()    {        switch (fState)        {            case CALLING_ACTIONS:                return CALLING_ACTIONS_STRING;            case COMPLETE:                return COMPLETE_STRING;            default:                return STATE_UNKNOWN_STRING;        }    }    public String getInfo()    {        return fCurrActionIndex + "/" + fActionList.size();    }    public String getDetails()    {        return "State:" + getStateAsString() +               ";ActionListSize:" + fActionList.size() +                ";CurrActionIndex:" + fCurrActionIndex +               ";ActionList:" + fActionList;    }    public void execute(STAXThread thread)    {        if (fState == CALLING_ACTIONS)        {            if (fActionList.size() > fCurrActionIndex)            {                STAXAction currAction =                           (STAXAction)fActionList.get(fCurrActionIndex++);                thread.pushAction(currAction.cloneAction());            }            else            {                fState = COMPLETE;                thread.popAction();            }        }    }    public void handleCondition(STAXThread thread, STAXCondition cond)    {        thread.popAction();    }    public STAXAction cloneAction()    {        STAXSequenceAction clone = new STAXSequenceAction();        clone.fActionList = fActionList;        return clone;    }    private int fState = CALLING_ACTIONS;    private int fCurrActionIndex = 0;    private ArrayList fActionList = new ArrayList();}

⌨️ 快捷键说明

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