Package com.helger.scope.mgr
Enum EScope
- java.lang.Object
-
- java.lang.Enum<EScope>
-
- com.helger.scope.mgr.EScope
-
- All Implemented Interfaces:
Serializable,Comparable<EScope>
public enum EScope extends Enum<EScope>
This enumeration defines all the possible non-web scopes including some utility methods on it.- Author:
- Philip Helger
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description IScopegetScope()IScopegetScope(boolean bCreateIfNotExisting)static IScopegetScope(EScope eScope, boolean bCreateIfNotExisting)Resolve the currently matching scope of the givenEScopevalue.static EScopevalueOf(String name)Returns the enum constant of this type with the specified name.static EScope[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Method Detail
-
values
public static EScope[] 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 (EScope c : EScope.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static EScope 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 nameNullPointerException- if the argument is null
-
getScope
@Nullable public static IScope getScope(@Nonnull EScope eScope, boolean bCreateIfNotExisting)
Resolve the currently matching scope of the givenEScopevalue.- Parameters:
eScope- The scope to resolve to a real scope.bCreateIfNotExisting- iffalseand the scope is not existing,nullwill be returned. This parameter is only used in application scopes.- Returns:
- The matching
IScopeornullif bCreateIfNotExisting isfalseand no scope is present - Throws:
IllegalArgumentException- If an illegal enumeration value is passed.
-
-