Class DemoBase
java.lang.Object
org.codehaus.commons.compiler.samples.DemoBase
- Direct Known Subclasses:
ExpressionDemo
,ScriptDemo
Common base class for the "...Demo" classes that demostrate Janino.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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[]
static Class
<?> static Class<?>[]
Converts the given comma-separated list of class names to an array ofClass
es.
-
Constructor Details
-
DemoBase
protected DemoBase()
-
-
Method Details
-
createObject
public static Object createObject(Class<?> type, String value) throws NoSuchMethodException, InstantiationException, InvocationTargetException, IllegalAccessException Creates an instance of the given type, by calling the single-string-parameter constructor, or, if the value equals "", the zero-parameter constructor. -
explode
- Returns:
- s, split at the commas
-
stringToType
- Returns:
- s, converted to a Java type
-
stringToTypes
Converts the given comma-separated list of class names to an array ofClass
es.
-