|
static boolean | loadUnguarded (final String className) throws ClassNotFoundException |
|
static< T > T | invokeUnguarded (final String className, final String methodName, final Object... args) throws ClassNotFoundException, SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException |
|
static< T > T | invoke (final String className, final String methodName, final Object... args) |
|
static boolean | isInClassPath (final String className) |
|
Utility class to invoke class methods dynamically
- Author
- Bernard Bou
◆ Invoke()
grammarscope.common.utils.Invoke.Invoke |
( |
| ) |
|
|
private |
◆ invoke()
static <T> T grammarscope.common.utils.Invoke.invoke |
( |
final String |
className, |
|
|
final String |
methodName, |
|
|
final Object... |
args |
|
) |
| |
|
static |
Dynamically invoke method (exception guarded)
- Parameters
-
className | class name |
methodName | method name |
args | arguments |
<T> | type of result |
- Returns
- result
◆ invokeUnguarded()
static <T> T grammarscope.common.utils.Invoke.invokeUnguarded |
( |
final String |
className, |
|
|
final String |
methodName, |
|
|
final Object... |
args |
|
) |
| throws ClassNotFoundException, SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException |
|
static |
Dynamically invoke method (exception unguarded)
- Parameters
-
className | class name |
methodName | method name |
args | arguments |
<T> | type of result |
- Returns
- result
- Exceptions
-
ClassNotFoundException | exception |
SecurityException | exception |
NoSuchMethodException | exception |
IllegalArgumentException | exception |
IllegalAccessException | exception |
InvocationTargetException | exception |
◆ isInClassPath()
static boolean grammarscope.common.utils.Invoke.isInClassPath |
( |
final String |
className | ) |
|
|
static |
Is class available in classpath ?
- Parameters
-
- Returns
- true if class is in classpath
◆ loadUnguarded()
static boolean grammarscope.common.utils.Invoke.loadUnguarded |
( |
final String |
className | ) |
throws ClassNotFoundException |
|
static |
Dynamically load class (exception unguarded)
- Parameters
-
- Returns
- true
- Exceptions
-
ClassNotFoundException | exception |
SecurityException | exception |
The documentation for this class was generated from the following file:
- grammarscope/common/src/main/java/grammarscope/common/utils/Invoke.java