org.springframework.shell.core
Class MethodTarget
java.lang.Object
org.springframework.shell.core.MethodTarget
public class MethodTarget
- extends Object
A method that can be executed via a shell command.
Immutable since 1.2.0.
MethodTarget
public MethodTarget(Method method,
Object target)
- Constructor for a
null remainingBuffer
and key
- Parameters:
method
- the method to invoke (required)target
- the object on which the method is to be invoked (required)- Since:
- 1.2.0
MethodTarget
public MethodTarget(Method method,
Object target,
String remainingBuffer,
String key)
- Constructor that allows all fields to be set
- Parameters:
method
- the method to invoke (required)target
- the object on which the method is to be invoked (required)remainingBuffer
- can be blankkey
- can be blank- Since:
- 1.2.0
equals
public boolean equals(Object other)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
toString
public final String toString()
- Overrides:
toString
in class Object
getKey
public String getKey()
- Since:
- 1.2.0
getMethod
public Method getMethod()
- Returns:
- a non-
null
method - Since:
- 1.2.0
getRemainingBuffer
public String getRemainingBuffer()
- Since:
- 1.2.0
getTarget
public Object getTarget()
- Returns:
- a non-
null
Object - Since:
- 1.2.0