org.appfuse.util
Class ConvertUtil

java.lang.Object
  extended by org.appfuse.util.ConvertUtil

public final class ConvertUtil
extends java.lang.Object

Utility class to convert one object to another.

Author:
Matt Raible

Constructor Summary
ConvertUtil()
           
 
Method Summary
static java.util.Map<java.lang.String,java.lang.String> convertBundleToMap(java.util.ResourceBundle rb)
          Method to convert a ResourceBundle to a Map object.
static java.util.Properties convertBundleToProperties(java.util.ResourceBundle rb)
          Method to convert a ResourceBundle to a Properties object.
static java.util.Map<java.lang.String,java.lang.String> convertListToMap(java.util.List<org.appfuse.model.LabelValue> list)
           
static java.lang.Object populateObject(java.lang.Object obj, java.util.ResourceBundle rb)
          Convenience method used by tests to populate an object from a ResourceBundle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConvertUtil

public ConvertUtil()
Method Detail

convertBundleToMap

public static java.util.Map<java.lang.String,java.lang.String> convertBundleToMap(java.util.ResourceBundle rb)
Method to convert a ResourceBundle to a Map object.

Parameters:
rb - a given resource bundle
Returns:
Map a populated map

convertListToMap

public static java.util.Map<java.lang.String,java.lang.String> convertListToMap(java.util.List<org.appfuse.model.LabelValue> list)

convertBundleToProperties

public static java.util.Properties convertBundleToProperties(java.util.ResourceBundle rb)
Method to convert a ResourceBundle to a Properties object.

Parameters:
rb - a given resource bundle
Returns:
Properties a populated properties object

populateObject

public static java.lang.Object populateObject(java.lang.Object obj,
                                              java.util.ResourceBundle rb)
Convenience method used by tests to populate an object from a ResourceBundle

Parameters:
obj - an initialized object
rb - a resource bundle
Returns:
a populated object


Copyright © 2003-2007. All Rights Reserved.