org.apache.myfaces.trinidad.util
Class ComponentUtils

java.lang.Object
  extended by org.apache.myfaces.trinidad.util.ComponentUtils

public class ComponentUtils
extends java.lang.Object

Utility functions used by the Apache Trinidad components.

Version:
$Name: $ ($Revision: adfrt/faces/adf-faces-api/src/main/java/oracle/adf/view/faces/util/ComponentUtils.java#0 $) $Date: 10-nov-2005.19:08:37 $

Method Summary
static boolean resolveBoolean(java.lang.Object value)
          Utility method for component code that transforms Object->boolean.
static boolean resolveBoolean(java.lang.Object value, boolean defaultValue)
          Utility method for component code that transforms Object->boolean.
static char resolveCharacter(java.lang.Character value)
          Utility method for component code that transforms Character->character.
static char resolveCharacter(java.lang.Character value, char defaultValue)
          Utility method for component code that transforms Long->long.
static java.util.Date resolveDate(java.lang.Object value)
          Utility method for code that transforms Object->Date
static java.util.Date resolveDate(java.lang.Object value, java.util.Date defaultValue)
          Utility method for code that transforms Object->Date
static double resolveDouble(java.lang.Object value)
          Utility method for component code that transforms an Object (which must be a java.lang.Number) into a long.
static double resolveDouble(java.lang.Object value, double defaultValue)
          Utility method for component code that transforms an Object (which must be a java.lang.Number) into a long.
static int resolveInteger(java.lang.Object value)
          Utility method for component code that transforms an Object (which must be a java.lang.Number) into an int.
static int resolveInteger(java.lang.Object value, int defaultValue)
          Utility method for component code that transforms an Object (which must be a java.lang.Number) into an int.
static java.util.Locale resolveLocale(java.lang.Object value)
           
static java.util.Locale resolveLocale(java.lang.Object value, java.util.Locale defaultValue)
           
static long resolveLong(java.lang.Object value)
          Utility method for component code that transforms an Object (which must be a java.lang.Number) into a long.
static long resolveLong(java.lang.Object value, long defaultValue)
          Utility method for component code that transforms an Object (which must be a java.lang.Number) into a long.
static java.lang.Object resolveObject(java.lang.Object value, java.lang.Object defaultValue)
          Utility method for component code that resolves an Object, returning a default value if the value is null.
static java.lang.String resolveString(java.lang.Object value)
          Utility method for component code that transforms Object->String.
static java.lang.String resolveString(java.lang.Object value, java.lang.String defaultValue)
          Utility method for component code that transforms Object->String.
static java.lang.String[] resolveStringArray(java.lang.Object value)
          Utility method for code that transforms Object->String[]
static java.lang.String[] resolveStringArray(java.lang.Object value, java.lang.String[] defaultValue)
          Utility method for code that transforms Object->String[]
static java.util.TimeZone resolveTimeZone(java.lang.Object value)
           
static java.util.TimeZone resolveTimeZone(java.lang.Object value, java.util.TimeZone defaultValue)
           
static java.lang.Throwable unwrap(java.lang.Throwable t)
          Gets the root cause of an exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

resolveObject

public static java.lang.Object resolveObject(java.lang.Object value,
                                             java.lang.Object defaultValue)
Utility method for component code that resolves an Object, returning a default value if the value is null.


resolveBoolean

public static boolean resolveBoolean(java.lang.Object value,
                                     boolean defaultValue)
Utility method for component code that transforms Object->boolean.


resolveBoolean

public static boolean resolveBoolean(java.lang.Object value)
Utility method for component code that transforms Object->boolean.


resolveInteger

public static int resolveInteger(java.lang.Object value)
Utility method for component code that transforms an Object (which must be a java.lang.Number) into an int.


resolveInteger

public static int resolveInteger(java.lang.Object value,
                                 int defaultValue)
Utility method for component code that transforms an Object (which must be a java.lang.Number) into an int.


resolveLong

public static long resolveLong(java.lang.Object value)
Utility method for component code that transforms an Object (which must be a java.lang.Number) into a long.


resolveLong

public static long resolveLong(java.lang.Object value,
                               long defaultValue)
Utility method for component code that transforms an Object (which must be a java.lang.Number) into a long.


resolveDouble

public static double resolveDouble(java.lang.Object value)
Utility method for component code that transforms an Object (which must be a java.lang.Number) into a long.


resolveDouble

public static double resolveDouble(java.lang.Object value,
                                   double defaultValue)
Utility method for component code that transforms an Object (which must be a java.lang.Number) into a long.


resolveCharacter

public static char resolveCharacter(java.lang.Character value)
Utility method for component code that transforms Character->character.


resolveCharacter

public static char resolveCharacter(java.lang.Character value,
                                    char defaultValue)
Utility method for component code that transforms Long->long.


resolveString

public static java.lang.String resolveString(java.lang.Object value)
Utility method for component code that transforms Object->String.


resolveString

public static java.lang.String resolveString(java.lang.Object value,
                                             java.lang.String defaultValue)
Utility method for component code that transforms Object->String.


resolveStringArray

public static java.lang.String[] resolveStringArray(java.lang.Object value)
Utility method for code that transforms Object->String[]


resolveStringArray

public static java.lang.String[] resolveStringArray(java.lang.Object value,
                                                    java.lang.String[] defaultValue)
Utility method for code that transforms Object->String[]


resolveDate

public static java.util.Date resolveDate(java.lang.Object value)
Utility method for code that transforms Object->Date


resolveDate

public static java.util.Date resolveDate(java.lang.Object value,
                                         java.util.Date defaultValue)
Utility method for code that transforms Object->Date


resolveTimeZone

public static java.util.TimeZone resolveTimeZone(java.lang.Object value)

resolveTimeZone

public static java.util.TimeZone resolveTimeZone(java.lang.Object value,
                                                 java.util.TimeZone defaultValue)

resolveLocale

public static java.util.Locale resolveLocale(java.lang.Object value)

resolveLocale

public static java.util.Locale resolveLocale(java.lang.Object value,
                                             java.util.Locale defaultValue)

unwrap

public static java.lang.Throwable unwrap(java.lang.Throwable t)
Gets the root cause of an exception. Keeps unwrapping the given throwable until the root cause is found.



Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.