-
toString
public String toString()
Returns a string representation of this stack trace element. The format of this string depends on the implementation, but the following examples may be regarded as typical:
- "
MyClass.mash(my.module@9com.foo.loader/foo@9.0/MyClasscom.foo.Main.run(Main.java:101) " - Here, "MyClass" isSee the fully-qualified name of the class containing the execution point represented by this stack trace element, "mash" is the name of the method containing the execution point, "my.module" is the module name, "9.0" is the module version, and "101" is the line number of the source line containing the execution point."MyClass.mash(my.module@9description below.
-
"
com.foo.loader/foo@9.0/MyClasscom.foo.Main.run(Main.java) " - As above, but theThe line number is unavailable.
- "
MyClass.mash(my.module@9com.foo.loader/foo@9.0/com.foo.Main.run(Unknown Source) " - As above, but neitherNeither the file name nor the line number areis available.
- "
MyClass.mash(my.module@9com.foo.loader/foo@9.0/com.foo.Main.run(Native Method) " - As above, but neitherThe method containing the execution point is a native method.
-
"
com.foo.loader//com.foo.bar.App.run(App.java:12) " - The class of the execution point is defined in the unnamed module of the class loader named com.foo.loader .
-
"
acme@2.1/org.acme.Lib.test(Lib.java:80) " - The class of the execution point is defined in acme module loaded by by a built-in class loader such as the application class loader.
-
"
MyClass.mash(MyClass.java:9) " - MyClass class is on the application class path.
The first example shows a stack trace element consisting of three elements, each separated by "/" followed with the source file name norand the line number are available,of the source line containing the execution point. The first element "com.foo.loader " is the name of the class loader. The second element "foo@9.0 " is the module name and version. The third element is the method containing the execution point; "com.foo.Main" " is known to be a nativethe fully-qualified class name and "run " is the name of the method. "Main.java " is the source file name and "101 " is the line number.
If a class is defined in an unnamed module then the execution pointsecond element is notomitted as shown in "com.foo.loader//com.foo.bar.App.run(App.java:12) ". If the class loader is a built-in class loader or is not named then the first element and its following "/" are omitted as shown in "acme@2.1/org.acme.Lib.test(Lib.java:80) ". If the first element is omitted and the module is an unnamed module, "my.module@9.0/" will bethe second element and its following "/" are also omitted from the aboveas shown in "MyClass.mash(MyClass.java:9) ".
-
Overrides:
-
toString in class Object
-
Returns:
- a string representation of the object.
-
See Also:
-
Throwable.printStackTrace()
|
-
toString
public String toString()
Returns a string representation of this stack trace element. The format of this string depends on the implementation, but the following examples may be regarded as typical:
-
"MyClass.mash(my.module@9.0/MyClass.java:101)" - Here, "MyClass" is the fully-qualified name of the class containing the execution point represented by this stack trace element, "mash" is the name of the method containing the execution point, "my.module" is the module name, "9.0" is the module version, and "101" is the line number of the source line containing the execution point.
-
"MyClass.mash(my.module@9.0/MyClass.java)" - As above, but the line number is unavailable.
-
"MyClass.mash(my.module@9.0/Unknown Source)" - As above, but neither the file name nor the line number are available.
-
"MyClass.mash(my.module@9.0/Native Method)" - As above, but neither the file name nor the line number are available, and the method containing the execution point is known to be a native method.
If the execution point is not in a named module, "my.module@9.0/" will be omitted from the above.
-
Overrides:
-
toString in class Object
-
Returns:
- a string representation of the object.
-
See Also:
-
Throwable.printStackTrace()
|
-
toString
public String toString()
Returns a string representation of this stack trace element. The format of this string depends on the implementation, but the following examples may be regarded as typical:
- "
com.foo.loader/foo@9.0/com.foo.Main.run(Main.java:101) " - See the description below.
- "
com.foo.loader/foo@9.0/com.foo.Main.run(Main.java) " - The line number is unavailable.
- "
com.foo.loader/foo@9.0/com.foo.Main.run(Unknown Source) " - Neither the file name nor the line number is available.
- "
com.foo.loader/foo@9.0/com.foo.Main.run(Native Method) " - The method containing the execution point is a native method.
- "
com.foo.loader//com.foo.bar.App.run(App.java:12) " - The class of the execution point is defined in the unnamed module of the class loader named com.foo.loader .
- "
acme@2.1/org.acme.Lib.test(Lib.java:80) " - The class of the execution point is defined in acme module loaded by by a built-in class loader such as the application class loader.
- "
MyClass.mash(MyClass.java:9) " - MyClass class is on the application class path.
The first example shows a stack trace element consisting of three elements, each separated by "/" followed with the source file name and the line number of the source line containing the execution point. The first element "com.foo.loader " is the name of the class loader. The second element "foo@9.0 " is the module name and version. The third element is the method containing the execution point; "com.foo.Main" " is the fully-qualified class name and "run " is the name of the method. "Main.java " is the source file name and "101 " is the line number.
If a class is defined in an unnamed module then the second element is omitted as shown in "com.foo.loader//com.foo.bar.App.run(App.java:12) ". If the class loader is a built-in class loader or is not named then the first element and its following "/" are omitted as shown in "acme@2.1/org.acme.Lib.test(Lib.java:80) ". If the first element is omitted and the module is an unnamed module, the second element and its following "/" are also omitted as shown in "MyClass.mash(MyClass.java:9) ".
-
Overrides:
-
toString in class Object
-
Returns:
- a string representation of the object.
-
See Also:
-
Throwable.printStackTrace()
|
|