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 ObjectdynamicCall(String clzName, String methodName, Class[] methodParamTypes, Object[] methodArgs)static StringgetClassname(Class clz)static String[]getStringArrayClassField(Class clz, String name)static StringgetStringClassField(Class clz, String name)static booleanisDouble(Class clz)static booleanisGeometry(Class<?> clz)static booleanisNumber(Class clz)static DoubletoDouble(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)
-
-