randoop.util
Class MethodReflectionCode

Object
  extended by ReflectionCode
      extended by MethodReflectionCode

public final class MethodReflectionCode
extends ReflectionCode

This is used to wrap a method together with its parameters, ready for execution. Can be run only once.


Constructor Summary
Constructor and Description
MethodReflectionCode(Method method, Object receiver, Object[] inputs)
           
 
Method Summary
Modifier and Type Method and Description
 Throwable getExceptionThrown()
           
 Object[] getInputs()
           
 Method getMethod()
           
 Object getReceiver()
           
 Object getReturnVariable()
           
 void runReflectionCodeRaw()
          Executed the reflection code.
 String toString()
           
 
Methods inherited from class ReflectionCode
hasRunAlready, runReflectionCode, setRunAlready
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MethodReflectionCode

public MethodReflectionCode(Method method,
                            Object receiver,
                            Object[] inputs)
Method Detail

runReflectionCodeRaw

public void runReflectionCodeRaw()
                          throws IllegalAccessException,
                                 InvocationTargetException
Description copied from class: ReflectionCode
Executed the reflection code. All internal exceptions must be thrown as NotCaughtIllegalStateException because everything else is caught.

Specified by:
runReflectionCodeRaw in class ReflectionCode
Throws:
IllegalAccessException
InvocationTargetException

getReturnVariable

public Object getReturnVariable()
Specified by:
getReturnVariable in class ReflectionCode

getExceptionThrown

public Throwable getExceptionThrown()
Specified by:
getExceptionThrown in class ReflectionCode

getMethod

public Method getMethod()

getReceiver

public Object getReceiver()

getInputs

public Object[] getInputs()

toString

public String toString()
Overrides:
toString in class Object