diff options
author | mark <mark@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-01-17 18:09:40 +0000 |
---|---|---|
committer | mark <mark@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-01-17 18:09:40 +0000 |
commit | 2d8cf20d0d5ca6b1fbdefc22229d4b7cf1497ede (patch) | |
tree | c976ca91e3ef0bda3b34b37c0195145638d8d08e /libjava/classpath/java/lang/StackTraceElement.java | |
parent | a3ef37ddfeddcc5b0f1c5068d8fdeb25a302d5cd (diff) | |
download | ppe42-gcc-2d8cf20d0d5ca6b1fbdefc22229d4b7cf1497ede.tar.gz ppe42-gcc-2d8cf20d0d5ca6b1fbdefc22229d4b7cf1497ede.zip |
Imported GNU Classpath 0.20
* Makefile.am (AM_CPPFLAGS): Add classpath/include.
* java/nio/charset/spi/CharsetProvider.java: New override file.
* java/security/Security.java: Likewise.
* sources.am: Regenerated.
* Makefile.in: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109831 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/classpath/java/lang/StackTraceElement.java')
-rw-r--r-- | libjava/classpath/java/lang/StackTraceElement.java | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/libjava/classpath/java/lang/StackTraceElement.java b/libjava/classpath/java/lang/StackTraceElement.java index 6dd4d8532e8..cf4d1c76f4d 100644 --- a/libjava/classpath/java/lang/StackTraceElement.java +++ b/libjava/classpath/java/lang/StackTraceElement.java @@ -49,7 +49,7 @@ import java.io.Serializable; * @author Mark Wielaard (mark@klomp.org) * @author Eric Blake (ebb9@email.byu.edu) * @since 1.4 - * @status updated to 1.4 + * @status updated to 1.5 */ public final class StackTraceElement implements Serializable { @@ -112,6 +112,26 @@ public final class StackTraceElement implements Serializable } /** + * Create a new StackTraceElement representing a given source location. + * + * @param className the fully qualified name of the class + * @param methodName the name of the method + * @param fileName the name of the file, null if unknown + * @param lineNumber the line in the file, negative if unknown, or -2 + * if this method is native + * + * @since 1.5 + */ + public StackTraceElement(String className, String methodName, String fileName, + int lineNumber) + { + this(fileName, lineNumber, className, methodName, lineNumber == -2); + // The public constructor doesn't allow certain values to be null. + if (className == null || methodName == null) + throw new NullPointerException("invalid argument to constructor"); + } + + /** * Returns the name of the file, or null if unknown. This is usually * obtained from the <code>SourceFile</code> attribute of the class file * format, if present. |