ch.tatool.app.util
Class AppUtils

java.lang.Object
  extended by ch.tatool.app.util.AppUtils

public class AppUtils
extends Object

Utility methods for the application

Author:
Michael Ruflin

Constructor Summary
AppUtils()
           
 
Method Summary
static Object createInstance(String className, Class<?> targetClass, boolean failWithError)
          Instantiates a bean given the bean class.
static String getStartupProperty(String key, String defaultValue)
          Get a startup property
static void setStartupProperty(String key, String value)
          Set a startup property value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AppUtils

public AppUtils()
Method Detail

setStartupProperty

public static void setStartupProperty(String key,
                                      String value)
Set a startup property value.

Parameters:
key - the key to set
value - the value to set, null to remove the key

getStartupProperty

public static String getStartupProperty(String key,
                                        String defaultValue)
Get a startup property


createInstance

public static Object createInstance(String className,
                                    Class<?> targetClass,
                                    boolean failWithError)
Instantiates a bean given the bean class.

Parameters:
className - the name of the class to instantiate
failWithError - whether an error should be thrown if the instantiation fails


Copyright © 2012. All Rights Reserved.