Package adams.core
Class EnumHelper
- java.lang.Object
-
- adams.core.EnumHelper
-
public class EnumHelper extends Object
Helper class for enum-related operations.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Field Summary
Fields Modifier and Type Field Description static String
METHOD_VALUES
the name of the static method for returning all values of an enum.
-
Constructor Summary
Constructors Constructor Description EnumHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Class
determineClass(Object obj)
Determines the base class.static Object[]
getValues(Class cls)
Gets all the values of the num.static Object[]
getValues(Object obj)
Gets all the values of the num.static Object
parse(Class cls, String s)
Parses the given enum string.
-
-
-
Field Detail
-
METHOD_VALUES
public static final String METHOD_VALUES
the name of the static method for returning all values of an enum.- See Also:
- Constant Field Values
-
-
Method Detail
-
getValues
public static Object[] getValues(Object obj)
Gets all the values of the num.- Parameters:
obj
- the enm object to get the values from- Returns:
- an array of string tags.
-
getValues
public static Object[] getValues(Class cls)
Gets all the values of the num.- Parameters:
cls
- the enm class to get the values from- Returns:
- an array of string tags.
-
determineClass
public static Class determineClass(Object obj)
Determines the base class.- Parameters:
obj
- the object to inspect- Returns:
- the determined class
-
-