Package randoop.util
Class MethodReflectionCode
- java.lang.Object
-
- randoop.util.ReflectionCode
-
- randoop.util.MethodReflectionCode
-
public final class MethodReflectionCode extends ReflectionCode
Wraps a method together with its arguments, ready for execution. Can be run only once.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class randoop.util.ReflectionCode
ReflectionCode.ReflectionCodeException
-
-
Field Summary
Fields Modifier and Type Field Description private Object[]
inputs
The arguments that the method is applied to.private Method
method
The method to be called.private Object
receiver
The receiver, or null for a static method.-
Fields inherited from class randoop.util.ReflectionCode
exceptionThrown, retval
-
-
Constructor Summary
Constructors Constructor Description MethodReflectionCode(Method method, Object receiver, Object[] inputs)
Create a new MethodReflectionCode to represent a method invocation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private boolean
isInstanceMethod()
void
runReflectionCodeRaw()
Execute the reflection code.String
toString()
-
Methods inherited from class randoop.util.ReflectionCode
getExceptionThrown, getReturnValue, hasRun, hasStarted, runReflectionCode, setHasRun, setHasStarted, status
-
-
-
-
Constructor Detail
-
MethodReflectionCode
public MethodReflectionCode(Method method, Object receiver, Object[] inputs)
Create a new MethodReflectionCode to represent a method invocation.- Parameters:
method
- the method to be calledreceiver
- the receiver, or null for a static methodinputs
- the arguments that the method is applied to
-
-
Method Detail
-
isInstanceMethod
private boolean isInstanceMethod()
-
runReflectionCodeRaw
public void runReflectionCodeRaw()
Description copied from class:ReflectionCode
Execute the reflection code. All Randoop implementation errors must be thrown as ReflectionCodeException because everything else is caught.- Specified by:
runReflectionCodeRaw
in classReflectionCode
-
-