Enum Class SourceScheme

java.lang.Object
java.lang.Enum<SourceScheme>
org.apache.camel.dsl.jbang.core.common.SourceScheme
All Implemented Interfaces:
Serializable, Comparable<SourceScheme>, Constable

public enum SourceScheme extends Enum<SourceScheme>
Supported set of file resource and URL schemes that may be used to resolve a resource (e.g. source file).
  • Enum Constant Details

  • Method Details

    • values

      public static SourceScheme[] 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 SourceScheme 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
    • isRemote

      public boolean isRemote()
    • fromUri

      public static SourceScheme fromUri(String path)
      Try to resolve source scheme from given file path URL. Checks for special GIST and GITHUB endpoint URLs. By default, uses unknown scheme usually leads to loading resource from file system.
      Parameters:
      path -
      Returns:
    • onlyName

      public static String onlyName(String name)
      If any strip scheme prefix from given name.
      Parameters:
      name -
      Returns: