This module provides access to class files compiled in the current workspace. Typically these files will be derived from .java files, but this module accepts any source that compiles to .class files.
This module depends on following other modules which will automatically be loaded.
Method | Description |
---|---|
compile() | Retrieve class for a given JRE resource. |
createInstance() | Create an instance of a given JRE resource. |
invokeStatic() | Invoke a static method on a given JRE resource. |
Class<?> compile(Object location) throws ClassNotFoundException, org.eclipse.jdt.core.JavaModelException, MalformedURLException
Retrieve class for a given JRE resource.
class instance
Object createInstance(String location) throws ClassNotFoundException, org.eclipse.jdt.core.JavaModelException, MalformedURLException, InstantiationException, IllegalAccessException
Create an instance of a given JRE resource. The default constructor is used to create the class instance.
class instance
Object invokeStatic(String location, String methodName) throws ClassNotFoundException, org.eclipse.jdt.core.JavaModelException, MalformedURLException, NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException
Invoke a static method on a given JRE resource.
invoked method result