org.apache.maven.artifact
Enum ArtifactScopeEnum

java.lang.Object
  extended by java.lang.Enum<ArtifactScopeEnum>
      extended by org.apache.maven.artifact.ArtifactScopeEnum
All Implemented Interfaces:
Serializable, Comparable<ArtifactScopeEnum>

public enum ArtifactScopeEnum
extends Enum<ArtifactScopeEnum>

Type safe reincarnation of Artifact scope. Also supplies the DEFAULT_SCOPE as well as convenience method to deal with scope relationships.

Author:
Oleg Gusakov

Enum Constant Summary
compile
           
provided
           
runtime
           
runtime_plus_system
           
system
           
test
           
 
Field Summary
static ArtifactScopeEnum DEFAULT_SCOPE
           
 
Method Summary
static ArtifactScopeEnum checkScope(ArtifactScopeEnum scope)
          Helper method to simplify null processing
 boolean encloses(ArtifactScopeEnum scope)
          scope relationship function.
 String getScope()
           
static ArtifactScopeEnum valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ArtifactScopeEnum[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

compile

public static final ArtifactScopeEnum compile

test

public static final ArtifactScopeEnum test

runtime

public static final ArtifactScopeEnum runtime

provided

public static final ArtifactScopeEnum provided

system

public static final ArtifactScopeEnum system

runtime_plus_system

public static final ArtifactScopeEnum runtime_plus_system
Field Detail

DEFAULT_SCOPE

public static final ArtifactScopeEnum DEFAULT_SCOPE
Method Detail

values

public static ArtifactScopeEnum[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ArtifactScopeEnum c : ArtifactScopeEnum.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ArtifactScopeEnum valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
NullPointerException - if the argument is null

checkScope

public static final ArtifactScopeEnum checkScope(ArtifactScopeEnum scope)
Helper method to simplify null processing

Returns:

getScope

public String getScope()
Returns:
unsafe String representation of this scope.

encloses

public boolean encloses(ArtifactScopeEnum scope)
scope relationship function. Used by the graph conflict resolution policies

Parameters:
scope -
Returns:
true is supplied scope is an inclusive sub-scope of current one.


Copyright © 2001-2012 The Apache Software Foundation. All Rights Reserved.