Package org.openrewrite.maven.tree
Enum Class Scope
- All Implemented Interfaces:
Serializable
,Comparable<Scope>
,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable String
asGradleConfigurationName
(@Nullable Scope scope) It is sometimes convenient for recipes that operate on both Gradle and Maven files to translate a Maven scope into a Gradle dependency configuration with a similar meaning.static Scope
boolean
isInClasspathOf
(@Nullable Scope scope) static @Nullable Scope
maxPrecedence
(@Nullable Scope scope1, @Nullable Scope scope2) Give two scopes, returns the scope with the highest precedence.@Nullable Scope
transitiveOf
(@Nullable Scope scope) static Scope
Returns the enum constant of this class with the specified name.static Scope[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
None
-
Compile
-
Provided
-
Runtime
-
Test
-
System
-
Invalid
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
isInClasspathOf
- Parameters:
scope
- The scope to test- Returns:
- If a dependency in this scope would be in the classpath of the tested scope.
-
transitiveOf
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
-
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.
-
asGradleConfigurationName
It is sometimes convenient for recipes that operate on both Gradle and Maven files to translate a Maven scope into a Gradle dependency configuration with a similar meaning. Gradle dependency configurations are more varied and have different semantics than Maven scopes, so this should be used deliberately and in contexts sufficiently general that the differences are not important.
-