grails.util
Enum BuildScope

java.lang.Object
  extended by java.lang.Enum<BuildScope>
      extended by grails.util.BuildScope
All Implemented Interfaces:
Serializable, Comparable<BuildScope>

public enum BuildScope
extends Enum<BuildScope>

An enum that represents the different scopes that plugins apply to

Since:
1.1

Created: Dec 12, 2008

Author:
Graeme Rocher

Enum Constant Summary
ALL
           
FUNCTIONAL_TEST
           
RUN
           
TEST
           
WAR
           
 
Field Summary
static String KEY
          The key used to lookup the build scope in the System properties
 
Method Summary
 void enable()
          Enables this build scope as the curent system wide instance
static BuildScope getCurrent()
          Returns the current Scope object based on the currently set "grails.scope" System property
static boolean isValid(String... scopeNames)
          Returns whether the specified scope name(s) are valid given the current scope
 String toString()
           
static BuildScope valueOf(String name)
          Returns the enum constant of this type with the specified name.
static BuildScope[] 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, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

TEST

public static final BuildScope TEST

WAR

public static final BuildScope WAR

RUN

public static final BuildScope RUN

ALL

public static final BuildScope ALL

FUNCTIONAL_TEST

public static final BuildScope FUNCTIONAL_TEST
Field Detail

KEY

public static final String KEY
The key used to lookup the build scope in the System properties

See Also:
Constant Field Values
Method Detail

values

public static BuildScope[] 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 (BuildScope c : BuildScope.values())
    System.out.println(c);

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

valueOf

public static BuildScope 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

toString

public String toString()
Overrides:
toString in class Enum<BuildScope>

getCurrent

public static BuildScope getCurrent()
Returns the current Scope object based on the currently set "grails.scope" System property

Returns:
The Scope object

isValid

public static boolean isValid(String... scopeNames)
Returns whether the specified scope name(s) are valid given the current scope

Parameters:
scopeNames - The list of scope names
Returns:
True if they are valid

enable

public void enable()
Enables this build scope as the curent system wide instance



Copyright (c) 2005-2009 The Grails project