public class ReflectionCommand extends MergeableCommand
| Constructor and Description |
|---|
ReflectionCommand(Object target,
String methodName,
Object... params)
Define a command on target object.
|
ReflectionCommand(Object plugin,
String className,
String methodName)
Predefine a command.
|
ReflectionCommand(Object plugin,
String className,
String methodName,
ClassLoader targetClassLoader,
Object... params)
Define a command.
|
| Modifier and Type | Method and Description |
|---|---|
protected Object |
doExecuteReflectionCommand(ClassLoader targetClassLoader,
String className,
Object target,
String method,
List<Object> params) |
boolean |
equals(Object o) |
void |
executeCommand()
Execute the command.
|
String |
getClassName() |
CommandExecutionListener |
getCommandExecutionListener() |
String |
getMethodName() |
List<Object> |
getParams() |
ClassLoader |
getTargetClassLoader() |
int |
hashCode() |
void |
setCommandExecutionListener(CommandExecutionListener commandExecutionListener) |
void |
setTargetClassLoader(ClassLoader targetClassLoader) |
String |
toString() |
getMergedCommands, merge, popMergedCommandspublic ReflectionCommand(Object plugin, String className, String methodName, ClassLoader targetClassLoader, Object... params)
public ReflectionCommand(Object plugin, String className, String methodName)
public String getClassName()
public String getMethodName()
public ClassLoader getTargetClassLoader()
public void setTargetClassLoader(ClassLoader targetClassLoader)
public CommandExecutionListener getCommandExecutionListener()
public void setCommandExecutionListener(CommandExecutionListener commandExecutionListener)
public void executeCommand()
protected Object doExecuteReflectionCommand(ClassLoader targetClassLoader, String className, Object target, String method, List<Object> params) throws ClassNotFoundException, IllegalAccessException, InstantiationException, NoSuchMethodException, InvocationTargetException
Copyright © 2018. All rights reserved.