Enum Class Scope

java.lang.Object
java.lang.Enum<Scope>
org.openrewrite.maven.tree.Scope
All Implemented Interfaces:
Serializable, Comparable<Scope>, Constable

public enum Scope extends Enum<Scope>
  • Enum Constant Details

    • None

      public static final Scope None
    • Compile

      public static final Scope Compile
    • Provided

      public static final Scope Provided
    • Runtime

      public static final Scope Runtime
    • Test

      public static final Scope Test
    • System

      public static final Scope System
    • Invalid

      public static final Scope Invalid
  • Method Details

    • values

      public static Scope[] 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 Scope 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
    • isInClasspathOf

      public boolean isInClasspathOf(@Nullable @Nullable Scope scope)
      Parameters:
      scope - The scope to test
      Returns:
      If a dependency in this scope would be in the classpath of the tested scope.
    • transitiveOf

      @Nullable public @Nullable Scope transitiveOf(@Nullable @Nullable Scope scope)
      See the table at https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#dependency-scope. this represents the scope on the top row of the table.
      Parameters:
      scope - The scope on the left column of the table.
      Returns:
      The scope inside the table.
    • fromName

      public static Scope fromName(@Nullable @Nullable String scope)
    • maxPrecedence

      @Nullable public static @Nullable Scope maxPrecedence(@Nullable @Nullable Scope scope1, @Nullable @Nullable Scope scope2)
      Give two scopes, returns the scope with the highest precedence.
      Returns:
      Scope with the higher precedence.