randoop.util
Class ConstructorReflectionCode

Object
  extended by ReflectionCode
      extended by ConstructorReflectionCode

public final class ConstructorReflectionCode
extends ReflectionCode

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


Constructor Summary
Constructor and Description
ConstructorReflectionCode(Constructor<?> constructor, Object[] inputs)
           
 
Method Summary
Modifier and Type Method and Description
 Constructor<?> getConstructor()
           
 Throwable getExceptionThrown()
           
 Object[] getInputs()
           
 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

ConstructorReflectionCode

public ConstructorReflectionCode(Constructor<?> constructor,
                                 Object[] inputs)
Method Detail

runReflectionCodeRaw

public void runReflectionCodeRaw()
                          throws InstantiationException,
                                 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:
InstantiationException
IllegalAccessException
InvocationTargetException

getReturnVariable

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

getExceptionThrown

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

getConstructor

public Constructor<?> getConstructor()

getInputs

public Object[] getInputs()

toString

public String toString()
Overrides:
toString in class Object