public final class AppRootFinder
extends Object
A utility that looks for the
Path
to the JAR, WAR or directory where a
Class
is located at.
-
Method Summary
Returns the
Path
to the JAR, WAR or directory where the specified
Class
is located at.
Returns the
Path
to the JAR, WAR or directory where the caller class of this method is located
at.
Returns the
Path
to the JAR, WAR or directory where the caller class of this method is located
at.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
findCurrent
public static Path findCurrent()
Returns the
Path
to the JAR, WAR or directory where the caller class of this method is located
at. This method is a shortcut for
findCurrent(0)
.
-
findCurrent
public static Path findCurrent(int callDepth)
Returns the
Path
to the JAR, WAR or directory where the caller class of this method is located
at.
- Parameters:
callDepth
- how many calls were made between the caller class and this findCurrent(int)
.
-
find
Returns the
Path
to the JAR, WAR or directory where the specified
Class
is located at.