Operation.ConstructorOperation, Operation.LookupVariableOperation, Operation.MethodOperation, Operation.NullOperation, Operation.PrimitiveTypeOperation, Operation.StringOperation, Operation.WrapperException| Constructor and Description |
|---|
MethodOperation(Method m,
boolean isStatic)
Creates a new MethodOperation for Method m.
|
MethodOperation(Method m,
Class returnTypeOverride,
boolean isStatic)
Creates a new MethodOperation for Method
m. |
| Modifier and Type | Method and Description |
|---|---|
Object |
apply(List<Object> input)
Applies the operation.
|
Class |
getReturnType()
Returns the Class of the object this operation returns.
|
String |
toString() |
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitexecuteTreepublic MethodOperation(Method m, boolean isStatic)
m - isStatic - public MethodOperation(Method m, Class returnTypeOverride, boolean isStatic)
m. It is necessary to specify
whether m is static or not. This constructor allows to specify a return type
more specific than the return type of m. This is useful e.g. if
we know that in fact an overridden implementation of m is called.m - returnTypeOverride - isStatic - public Object apply(List<Object> input) throws IllegalAccessException, InvocationTargetException
Operationapply in interface Operationinput - These inputs are used as parameters for the operation, in the
order in which they occur in the list.IllegalAccessExceptionInvocationTargetExceptionpublic Class getReturnType()
OperationgetReturnType in interface OperationCopyright © 2017. All rights reserved.