Enum Class TargetJvmEnvironment

java.lang.Object
java.lang.Enum<TargetJvmEnvironment>
org.openrewrite.gradle.attributes.java.TargetJvmEnvironment
All Implemented Interfaces:
Serializable, Comparable<TargetJvmEnvironment>, Constable, org.openrewrite.maven.attributes.Attribute

public enum TargetJvmEnvironment extends Enum<TargetJvmEnvironment> implements org.openrewrite.maven.attributes.Attribute
Attribute representing the target JVM environment of a dependency variant. This attribute can be used by libraries to indicate that a certain variant is better suited for a certain JVM environment. It does however NOT strictly require environments to match, as the general assumption is that Java libraries can also run on environments they are not optimized for.
  • Enum Constant Details

    • ANDROID

      public static final TargetJvmEnvironment ANDROID
      An Android environment.
    • STANDARD_JVM

      public static final TargetJvmEnvironment STANDARD_JVM
      A standard JVM environment (e.g. running on desktop or server machines).
  • Method Details

    • values

      public static TargetJvmEnvironment[] 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 TargetJvmEnvironment 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
    • key

      public static String key()
    • from

      public static @Nullable TargetJvmEnvironment from(@Nullable String targetJvmEnvironment)