Class AppRootFinder

java.lang.Object
com.linecorp.armeria.common.util.AppRootFinder

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 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

      public static Path find​(Class<?> clazz)
      Returns the Path to the JAR, WAR or directory where the specified Class is located at.