public static Path findCurrent(int callDepth) {
        final AtomicReference<Class<?>[]> classContextRef = new AtomicReference<>();
        new SecurityManager() {
            {
                classContextRef.set(getClassContext());
            }
        };

        // Skip the first two classes which are:
        // - This class
        // - The anonymous SecurityManager
        final Class<?>[] classes = classContextRef.get();
        assert classes != null;
        final int toSkip = 2;

        if (callDepth < 0 || callDepth + toSkip >= classes.length) {
            throw new IndexOutOfBoundsException(
                    "callDepth out of range: " + callDepth +
                    " (expected: 0 <= callDepth < " + (classes.length - toSkip) + ')');
        }

        return find(classes[toSkip + callDepth]);
    }
Returns the {@link Path} to the JAR, WAR or directory where the caller class of this method is located
at.

@param callDepth how many calls were made between the caller class and this {@link #findCurrent(int)}.
core/src/main/java/com/linecorp/armeria/common/util/AppRootFinder.java