org.proteios
Class TypeUtil
java.lang.Object
org.proteios.TypeUtil
public class TypeUtil
- extends Object
- Author:
- gregory
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TypeUtil
public TypeUtil()
parse
public Object parse(Class<?> cls,
String s)
getType
public Type getType(Class<?> cls)
isString
public boolean isString(Class<?> cls)
- Parameters:
cls -
- Returns:
- true if cls is a String
isEnum
public boolean isEnum(Class<?> cls)
- Parameters:
cls -
- Returns:
- true if cls is an enum
isBoolean
public boolean isBoolean(Class<?> cls)
- Parameters:
cls -
- Returns:
- true if cls is Boolean or boolean
isInt
public boolean isInt(Class<?> cls)
- Parameters:
cls - to check
- Returns:
- true if cls is an Integer or int
isFloat
public boolean isFloat(Class<?> cls)
- Parameters:
cls -
- Returns:
- true if cls is a Float or float
isDouble
public boolean isDouble(Class<?> cls)
- Parameters:
cls -
- Returns:
- true if cls is a Double or double
isLong
public boolean isLong(Class<?> cls)
- Parameters:
cls -
- Returns:
- true if cls is a Long or long