org.chwf.util
Class MiscUtils
java.lang.Object
|
+--org.chwf.util.MiscUtils
- public abstract class MiscUtils
- extends java.lang.Object
Utility class for static methods with no better location. The methods
in this class are not stable, and may move or change when a
more appropriate place for the operation is found.
- Author:
- Paul Strack
Method Summary |
static java.lang.String |
capitalize(java.lang.String string)
Converts first character to uppercase. |
static java.lang.Class |
deriveType(java.lang.Class beanClass,
java.lang.String property)
Derive property type. |
static java.lang.Class |
getWrapper(java.lang.Class type)
Get object wrapper for primitive types. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MiscUtils
public MiscUtils()
deriveType
public static java.lang.Class deriveType(java.lang.Class beanClass,
java.lang.String property)
throws java.lang.IllegalArgumentException
- Derive property type.
- Parameters:
beanClass
- The bean class.property
- The property.- Returns:
- The datatype.
- Throws:
java.lang.IllegalArgumentException
- If the property is invalid.
capitalize
public static java.lang.String capitalize(java.lang.String string)
- Converts first character to uppercase.
- Parameters:
string
- The string.- Returns:
- The capitalized string.
getWrapper
public static java.lang.Class getWrapper(java.lang.Class type)
- Get object wrapper for primitive types. Returns the wrapper class or
the original class for non-primitive types.
- Parameters:
type
- The type.- Returns:
- The wrapper.
Copyright © 2002-2004, Paul Strack. All Rights Reserved.