Enum Class SearchOrder

java.lang.Object
java.lang.Enum<SearchOrder>
com.github.hypfvieh.common.SearchOrder
All Implemented Interfaces:
Serializable, Comparable<SearchOrder>, Constable

public enum SearchOrder extends Enum<SearchOrder>
Defines where to look for a library.
  • Enum Constant Details

    • CUSTOM_PATH

      public static final SearchOrder CUSTOM_PATH
      Look in any given external path
    • CLASS_PATH

      public static final SearchOrder CLASS_PATH
      Look in classpath, this includes directory and the jar(s)
    • SYSTEM_PATH

      public static final SearchOrder SYSTEM_PATH
      Look in system path (e.g. /usr/lib on linux/unix systems)
  • Method Details

    • values

      public static SearchOrder[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SearchOrder valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • findFile

      public static InputStream findFile(String _fileName, SearchOrder... _order)
      Search for the given filename in given SearchOrder.
      Parameters:
      _fileName - filename
      _order - order
      Returns:
      InputStream of first found matching file or null if no file found