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

📄 throwable.java

📁 一个开源的JAVA虚拟机
💻 JAVA
字号:
/*    libaegisvm - The Aegis Virtual Machine for executing Java bytecode    Modifications by Philip W. L. Fong    Copyright (C) 2001-2002    This library is free software; you can redistribute it and/or    modify it under the terms of the GNU Lesser General Public    License as published by the Free Software Foundation; either    version 2.1 of the License, or (at your option) any later version.    This library is distributed in the hope that it will be useful,    but WITHOUT ANY WARRANTY; without even the implied warranty of    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU    Lesser General Public License for more details.    You should have received a copy of the GNU Lesser General Public    License along with this library; if not, write to the Free Software    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA*//* *  java.lang.Throwable * *  (c) 1997 George David Morrison * *  API version: 1.0.2 * *  History: *  01FEB1997  George David Morrison *    Initial version */package java.lang;import aegis.*;import java.io.*;public class Throwable implements Serializable {    /* The Aegis VM assumes the first instance reference field of a       Throwable object to be an Object[] for storing backtrace. */    private Object[] stackTrace;    private String detailMessage;    public Throwable() {	this(null);    }    public Throwable(String message) {	detailMessage = message;	fillInStackTrace();    }    public String getMessage() {	return detailMessage;    }    public String getLocalizedMessage() {	return getMessage();    }    public String toString() {	String s = getClass().getName();	if (detailMessage != null)	    s = s + ": " + detailMessage;	return s;    }    public void printStackTrace() {	printStackTrace(System.err);    }    public void printStackTrace(PrintStream s) {	s.println(this.toString());	if (stackTrace != null) {	    for (int i = 0; i < stackTrace.length; i++)		if (stackTrace != null)		    s.println("  in " + stackTrace[i].toString());	} else {	    s.println("No stack trace available.");	}    }    public void printStackTrace(PrintWriter s) {	s.println(this.toString());	if (stackTrace != null) {	    for (int i = 0; i < stackTrace.length; i++)		if (stackTrace != null)		    s.println("  in " + stackTrace[i].toString());	} else {	    s.println("No stack trace available.");	}    }    public native Throwable fillInStackTrace();}

⌨️ 快捷键说明

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