diff options
| author | Mark Wielaard <mark@gcc.gnu.org> | 2006-01-17 18:09:40 +0000 |
|---|---|---|
| committer | Mark Wielaard <mark@gcc.gnu.org> | 2006-01-17 18:09:40 +0000 |
| commit | 2127637945ea6b763966398130e0770fa993c860 (patch) | |
| tree | c976ca91e3ef0bda3b34b37c0195145638d8d08e /libjava/classpath/java/lang/StackTraceElement.java | |
| parent | bcb36c3e02e3bd2843aad1b9888513dfb5d6e337 (diff) | |
Imported GNU Classpath 0.20
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.
From-SVN: r109831
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. |
