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

📄 preverificationerrortype.java

📁 eclipseme的最新版本的source,欢迎j2me程序员使用
💻 JAVA
字号:
/**
 * Copyright (c) 2003-2005 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 eclipseme.preverifier.results;

/**
 * Error type enumeration for errors that are found during
 * preverification.
 * <p />
 * Copyright (c) 2003-2005 Craig Setera<br>
 * All Rights Reserved.<br>
 * Licensed under the Eclipse Public License - v 1.0<p/>
 * <br>
 * $Revision: 1.1 $
 * <br>
 * $Date: 2005/09/25 23:53:31 $
 * <br>
 * @author Craig Setera
 */
public final class PreverificationErrorType {
	private static final String[] STRINGS = new String[] {
		"No error",
		"Native code not allowed",
		"Floating point not allowed",
		"Finalizers not allowed",
		"Missing class definition",
		"Unknown error",
	};
	
	/** No error code */
	public static final int NO_ERROR_CODE = 0;

	/** No error type */
	public static final PreverificationErrorType NO_ERROR = new PreverificationErrorType(NO_ERROR_CODE);
	
	/** Native methods not allowed code */
	public static final int NATIVE_CODE = 1;

	/** Native methods not allowed */
	public static final PreverificationErrorType NATIVE = new PreverificationErrorType(NATIVE_CODE);
	
	/** Floating point not allowed in CLDC 1.0 code */
	public static final int FLOATING_POINT_CODE = 2;
	
	/** Floating point not allowed in CLDC 1.0 */
	public static final PreverificationErrorType FLOATING_POINT = new PreverificationErrorType(FLOATING_POINT_CODE);
	
	/** Finalizers not allowed code */
	public static final int FINALIZERS_CODE = 3;
	
	/** Finalizers not allowed */
	public static final PreverificationErrorType FINALIZERS = new PreverificationErrorType(FINALIZERS_CODE);
	
	/** Missing type definition code */
	public static final int MISSING_TYPE_CODE = 4;
	
	/** Missing type definition */
	public static final PreverificationErrorType MISSING_TYPE = new PreverificationErrorType(MISSING_TYPE_CODE);
	
	/** Unknown error type code */
	public static final int UNKNOWN_ERROR_CODE = 5;
	
	/** Unknown error type */
	public static final PreverificationErrorType UNKNOWN_ERROR = new PreverificationErrorType(UNKNOWN_ERROR_CODE);

	private int errorCode;
	
	/**
	 * Private constructor.
	 * 
	 * @param code
	 */
	private PreverificationErrorType(int code) {
		errorCode = code;
	}
	
	/**
	 * Get the code of th error that occurred.
	 * 
	 * @return
	 */
	public int getErrorCode() {
		return errorCode;
	}
	
	/**
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		return STRINGS[errorCode];
	}
}

⌨️ 快捷键说明

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