Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,28 @@
public class ReflectionGetSource {
public static void main(String[] args) {
new ReflectionGetSource().method1();
}
public ReflectionGetSource() {}
public void method1() {
method2();
}
public void method2() {
method3();
}
public void method3() {
Throwable t = new Throwable();
for ( StackTraceElement ste : t.getStackTrace() ) {
System.out.printf("File Name = %s%n", ste.getFileName());
System.out.printf("Class Name = %s%n", ste.getClassName());
System.out.printf("Method Name = %s%n", ste.getMethodName());
System.out.printf("Line number = %s%n%n", ste.getLineNumber());
}
}
}