Package org.locationtech.jtstest.util
Class ClassUtil
- java.lang.Object
-
- org.locationtech.jtstest.util.ClassUtil
-
public class ClassUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description ClassUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Object
dynamicCall(String clzName, String methodName, Class[] methodParamTypes, Object[] methodArgs)
static String
getClassname(Class clz)
static String[]
getStringArrayClassField(Class clz, String name)
static String
getStringClassField(Class clz, String name)
static boolean
isDouble(Class clz)
static boolean
isGeometry(Class<?> clz)
static boolean
isNumber(Class clz)
static Double
toDouble(Object o)
Converts a number-like object to a Double.
-
-
-
Method Detail
-
dynamicCall
public static Object dynamicCall(String clzName, String methodName, Class[] methodParamTypes, Object[] methodArgs) throws ClassNotFoundException, SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException
-
isNumber
public static boolean isNumber(Class clz)
-
toDouble
public static Double toDouble(Object o)
Converts a number-like object to a Double. If the object cannot be converted null is returned.- Parameters:
o
- a number-like object- Returns:
- the value of the number, or null
-
isDouble
public static boolean isDouble(Class clz)
-
isGeometry
public static boolean isGeometry(Class<?> clz)
-
-