Enum Class EConfigSourceType

java.lang.Object
java.lang.Enum<EConfigSourceType>
com.helger.config.source.EConfigSourceType
All Implemented Interfaces:
com.helger.base.id.IHasID<String>, Serializable, Comparable<EConfigSourceType>, Constable

public enum EConfigSourceType extends Enum<EConfigSourceType> implements com.helger.base.id.IHasID<String>
Defines the type of configuration sources and the respective default priority.
Author:
Philip Helger
  • Enum Constant Details

    • SYSTEM_PROPERTY

      public static final EConfigSourceType SYSTEM_PROPERTY
      A configuration values from a system property.
    • ENVIRONMENT_VARIABLE

      public static final EConfigSourceType ENVIRONMENT_VARIABLE
      A configuration value from an environment variable.
    • RESOURCE

      public static final EConfigSourceType RESOURCE
      A configuration value from a file.
    • APPLICATION

      public static final EConfigSourceType APPLICATION
      A configuration value from any other source inside the application.
  • Method Details

    • values

      public static EConfigSourceType[] 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 EConfigSourceType 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
    • getID

      @Nonnull @Nonempty public String getID()
      Specified by:
      getID in interface com.helger.base.id.IHasID<String>
    • getDefaultPriority

      @Nonnegative public int getDefaultPriority()
      Returns:
      The default priority for a configuration source of this type. Always > 0.
    • getFromIDOrNull

      @Nullable public static EConfigSourceType getFromIDOrNull(@Nullable String sID)