public class Invoker extends Object
Constructor and Description |
---|
Invoker() |
Modifier and Type | Method and Description |
---|---|
static String |
getContextLocation()
Obtains the current context location.
|
static void |
invoke(Object o,
Method m)
Invokes a method with no context location.
|
static void |
invoke(Object o,
Method m,
String location)
Invokes a method given a context location.
|
static boolean |
isVoidNoArg(Method m)
Checks a method whether it is a void, no-argument public method.
|
static void |
setContextLocation(String newLocation)
Sets a new context location.
|
static void |
throwCauseException(Exception e)
Throws the cause of an exception.
|
public static void throwCauseException(Exception e) throws Exception
e
- The exceptionException
- The causepublic static boolean isVoidNoArg(Method m)
m
- The method to be checkedpublic static void invoke(Object o, Method m, String location) throws Exception
o
- The object to invoke the method onm
- The methodlocation
- The context locationException
- Exceptions, if anypublic static void invoke(Object o, Method m) throws Exception
o
- The object to invoke the method onm
- The methodException
- Exceptions, if anypublic static void setContextLocation(String newLocation)
newLocation
- The new context locationpublic static String getContextLocation()