public class DemoBase extends Object
Modifier | Constructor and Description |
---|---|
protected |
DemoBase() |
Modifier and Type | Method and Description |
---|---|
static Object |
createObject(Class type,
String value)
Creates an instance of the given
type , by calling the single-string-parameter constructor, or, if
the value equals "", the zero-parameter constructor. |
static String[] |
explode(String s) |
static Class |
stringToType(String s) |
static Class[] |
stringToTypes(String s)
Converts the given comma-separated list of class names to an array of
Class es. |
static String |
toString(Object o)
A version of
Object.toString() that pretty-prints arrays. |
public static Object createObject(Class type, String value) throws NoSuchMethodException, InstantiationException, InvocationTargetException, IllegalAccessException
type
, by calling the single-string-parameter constructor, or, if
the value
equals "", the zero-parameter constructor.public static Class[] stringToTypes(String s)
Class
es.public static String toString(Object o)
Object.toString()
that pretty-prints arrays.Copyright © 2001–2016. All rights reserved.