Class DemoBase
- java.lang.Object
-
- org.codehaus.commons.compiler.samples.DemoBase
-
- Direct Known Subclasses:
ExpressionDemo,ScriptDemo
public class DemoBase extends Object
Common base class for the "...Demo" classes that demostrate Janino.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedDemoBase()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ObjectcreateObject(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 ofClasses.
-
-
-
Method Detail
-
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.
-
-