wt.fc
Class EnumeratedTypeUtil

java.lang.Object
  extended by wt.fc.EnumeratedTypeUtil

public class EnumeratedTypeUtil
extends Object

A set utility methods for working with EnumeratedTypes.

Supported API: true

Extendable: false


Method Summary
static String getStringValue(String classname, String internal_value)
          Gets the string representation for an EnumeratedType class and instance value, which can later be used to get that instance.
static void main(String[] args)
          Prints the contents of the specified sub class of EnumeratedType and verifies the contents of the resource bundles.
static EnumeratedType toEnumeratedType(String stringValue)
          Gets the instance of the concrete EnumeratedType given the string representation of the object.
static EnumeratedType toEnumeratedType(String classname, String internal_value)
          Gets the instance of the concrete EnumeratedType given the classname and internal_value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getStringValue

public static String getStringValue(String classname,
                                    String internal_value)
Gets the string representation for an EnumeratedType class and instance value, which can later be used to get that instance.

The format of the string representation is: classname.internal_value

Supported API: true

Parameters:
String - The fully qualified name of the concrete EnumeratedType class.
String - The internal value for a instance of that type.
Returns:
The string representation of an EnumeratedType instance
See Also:
#getStringValue()

main

public static void main(String[] args)
Prints the contents of the specified sub class of EnumeratedType and verifies the contents of the resource bundles.
   Example Usage:
      // for current user's locale
      java wt.fc.EnumeratedType wt.lifecycle.State
 

// for FRENCH locale java wt.fc.EnumeratedType wt.lifecycle.State fr

// for CANADA_FRENCH locale java wt.fc.EnumeratedType wt.lifecycle.State fr CA



Supported API: true

Parameters:
args - a String[] containing the following elements:

[0] fully qualified classname of EnumeratedType sub class

[1] two character language code (optional)

[2] two character country code (optional)

[3] two character variant code (optional)

See Also:
Locale

toEnumeratedType

public static EnumeratedType toEnumeratedType(String stringValue)
                                       throws WTInvalidParameterException
Gets the instance of the concrete EnumeratedType given the string representation of the object.

Supported API: true

Parameters:
String - The string representation of an EnumeratedType instance.
Returns:
The concrete EnumeratedType instance represented by stringValue. Returns null if passed a null.
Throws:
WTInvalidParameterException
See Also:
#getStringValue()

toEnumeratedType

public static EnumeratedType toEnumeratedType(String classname,
                                              String internal_value)
                                       throws WTInvalidParameterException
Gets the instance of the concrete EnumeratedType given the classname and internal_value.

Supported API: true

Parameters:
String - The fully qualified name of the concrete EnumeratedType class.
String - The internal value for a instance of that type.
Returns:
The concrete EnumeratedType instance represented by stringValue. Returns null if passed a null.
Throws:
WTInvalidParameterException
See Also:
#getStringValue()