net.dpml.lang
Class Category

java.lang.Object
  extended by net.dpml.lang.Enum
      extended by net.dpml.lang.ValuedEnum
          extended by net.dpml.lang.Category
All Implemented Interfaces:
Serializable, Comparable

public final class Category
extends ValuedEnum

Classoader category enumeration.

Version:
1.1.0
Author:
Digital Product Meta Library
See Also:
Serialized Form

Field Summary
static Category PRIVATE
          Implementation category.
static Category PROTECTED
          SPI category.
static Category PUBLIC
          API category.
static Category SYSTEM
          System category.
static Category UNDEFINED
          Undefined category.
 
Method Summary
static Category parse(int value)
          Create a category by parsing the supplied value.
static Category parse(String value)
          Create a category by parsing the supplied name.
 String toString()
          Return a string representation of the category.
static Category[] values()
          Returns an array of activation enum values.
 
Methods inherited from class net.dpml.lang.ValuedEnum
compareTo, equals, getValue, hashCode, isEqualTo, isGreaterThan, isGreaterThanOrEqual, isLessThan, isLessThanOrEqual
 
Methods inherited from class net.dpml.lang.Enum
getName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

UNDEFINED

public static final Category UNDEFINED
Undefined category.


SYSTEM

public static final Category SYSTEM
System category.


PUBLIC

public static final Category PUBLIC
API category.


PROTECTED

public static final Category PROTECTED
SPI category.


PRIVATE

public static final Category PRIVATE
Implementation category.

Method Detail

values

public static Category[] values()
Returns an array of activation enum values.

Returns:
the activation policies array

toString

public String toString()
Return a string representation of the category.

Overrides:
toString in class ValuedEnum
Returns:
the category name in uppercase

parse

public static Category parse(int value)
                      throws IllegalArgumentException
Create a category by parsing the supplied value.

Parameters:
value - the category name
Returns:
the corresponding category
Throws:
IllegalArgumentException - if the value is not recognized

parse

public static Category parse(String value)
                      throws IllegalArgumentException
Create a category by parsing the supplied name.

Parameters:
value - the category name
Returns:
the corresponding category
Throws:
IllegalArgumentException - if the value is not recognized