Package wt.meta

Class EnumeratedTypeUtil

java.lang.Object
wt.meta.EnumeratedTypeUtil

public class EnumeratedTypeUtil extends Object
A set of utility methods for working with EnumeratedTypes.

Supported API: true

Extendable: false
  • Method Details

    • 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:
    • 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 internal_value. Returns null if passed a null.
      Throws:
      WTInvalidParameterException
      See Also:
      • #getStringValue()
    • toEnumeratedTypeConstant

      public static EnumeratedType toEnumeratedTypeConstant(String classname, String constant_name) throws WTInvalidParameterException
      Gets the instance of the concrete EnumeratedType given the classname and a constant name.

      Supported API: true
      Parameters:
      String - The fully qualified name of the concrete EnumeratedType class.
      String - The constant name for a instance of that type.
      Returns:
      The concrete EnumeratedType instance represented by constant. Returns null if passed a null.
      Throws:
      WTInvalidParameterException
      See Also:
      • #getStringValue()
    • 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()