org.apache.myfaces.trinidadinternal.ui.data.bind
Class ConvertBoundValue

java.lang.Object
  extended by org.apache.myfaces.trinidadinternal.ui.data.bind.ConvertBoundValue
All Implemented Interfaces:
BoundValue

public class ConvertBoundValue
extends java.lang.Object
implements BoundValue

A BoundValue implementation that wraps another and converts its results to the specified java type.

Version:
$Name: $ ($Revision: adfrt/faces/adf-faces-impl/src/main/java/oracle/adfinternal/view/faces/ui/data/bind/ConvertBoundValue.java#0 $) $Date: 10-nov-2005.18:56:38 $
Author:
The Oracle ADF Faces Team

Constructor Summary
ConvertBoundValue(BoundValue wrapped, java.lang.Class<?> javaType)
          Creates a ConvertBoundValue.
ConvertBoundValue(BoundValue wrapped, java.lang.String javaType)
          Creates a ConvertBoundValue.
 
Method Summary
static java.lang.String getClassName(java.lang.String javaType)
          Gets the class name for a particular javaType. javaType is usually a Class name.
 java.lang.Object getValue(UIXRenderingContext context)
          Called to retrieve a value based on the current rendering context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConvertBoundValue

public ConvertBoundValue(BoundValue wrapped,
                         java.lang.String javaType)
Creates a ConvertBoundValue.

Parameters:
wrapped - the BoundValue to wrap
javaType - the Java type to convert to

ConvertBoundValue

public ConvertBoundValue(BoundValue wrapped,
                         java.lang.Class<?> javaType)
Creates a ConvertBoundValue.

Parameters:
wrapped - the BoundValue to wrap
javaType - the Java type to convert to
Method Detail

getValue

public java.lang.Object getValue(UIXRenderingContext context)
Description copied from interface: BoundValue
Called to retrieve a value based on the current rendering context.

Specified by:
getValue in interface BoundValue
Parameters:
context - the rendering context

getClassName

public static java.lang.String getClassName(java.lang.String javaType)
Gets the class name for a particular javaType. javaType is usually a Class name. However, in some cases it can be a simple string like: 'int', 'string', etc.. This method returns the proper Class name for those simple strings.

Parameters:
javaType - a Class name, or a simple string like 'string', 'int'
Returns:
if javaType is a Class name, then that Class name is returned. If javaType is a simple string, then the proper Class name for that string is returned.


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