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

📄 tableswitchandexceptiontest.java

📁 eclipseme的最新版本的source,欢迎j2me程序员使用
💻 JAVA
字号:
/**
 * Copyright (c) 2003-2004 Craig Setera
 * All Rights Reserved.
 * Licensed under the Eclipse Public License - v 1.0
 * For more information see http://www.eclipse.org/legal/epl-v10.html
 */
package preverification.inputs;

import java.io.IOException;

import preverification.tests.ITestable;
import preverification.tests.TestException;

/**
 * Type description
 * <p />
 * Copyright (c) 2003-2004 Craig Setera<br>
 * All Rights Reserved.<br>
 * Licensed under the Eclipse Public License - v 1.0<p/>
 * <br>
 * $Revision: 1.1 $
 * <br>
 * $Date: 2005/11/05 23:30:58 $
 * <br>
 * @author Craig Setera
 */
public class TableSwitchAndExceptionTest implements ITestable {
	private static final int OPTION0 = 0;
	private static final int OPTION1 = 1;
	private static final int OPTION2 = 2;
	private static final int OPTION3 = 3;
	private StringBuffer buffer;

	/**
	 * @see preverification.tests.ITestable#test(java.lang.Object[])
	 */
	public Object test(Object[] arguments) 
		throws TestException 
	{
		return new Boolean(test2(""));
	}
	
	private boolean test2(String strCode)
	{
		try
		{
			if (!format(null, strCode))
			{
				return(true);
			}
		}
		catch(IOException e)
		{
			showException(e, "formatUrl");
			return(false);
		}
		
		switch(subLaunch(null))
		{
			case OPTION0:
				this.exit();
				break;
				
			case OPTION1:
			case OPTION2:
				return(true);
			
			case OPTION3:
				showError(getError(), true);
				break;
		}
		
		return(false);
	}
	
	private boolean test3(String strCode)
	{
		boolean value = false;
		
		try
		{
			if (!format(null, strCode))
			{
				value = true;
			}
			
			switch(subLaunch(null))
			{
				case OPTION0:
					this.exit();
					break;
					
				case OPTION1:
				case OPTION2:
					value = true;
				
				case OPTION3:
					showError(getError(), true);
					break;
			}
		}
		catch(IOException e)
		{
			showException(e, "formatUrl");
			value = false;
		}
		
		return value;
	}

	private void showError(Object launchError, boolean b) {
		// TODO Auto-generated method stub
		
	}

	private Object getError() {
		// TODO Auto-generated method stub
		return null;
	}

	private void exit() {
		// TODO Auto-generated method stub
		
	}

	private int subLaunch(String string) {
		// TODO Auto-generated method stub
		return 0;
	}

	private void showException(IOException e, String string) {
		// TODO Auto-generated method stub
		
	}

	private boolean format(StringBuffer urlBuffer2, String strCode)
		throws IOException
	{
		// TODO Auto-generated method stub
		return false;
	}
}

⌨️ 快捷键说明

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