Package randoop.util
Class ConstructorReflectionCode
- java.lang.Object
-
- randoop.util.ReflectionCode
-
- randoop.util.ConstructorReflectionCode
-
public final class ConstructorReflectionCode extends ReflectionCode
Wraps a constructor 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 Constructor<?>
constructor
The constructor to be called.private Object[]
inputs
The arguments that the constructor is applied to.-
Fields inherited from class randoop.util.ReflectionCode
exceptionThrown, retval
-
-
Constructor Summary
Constructors Constructor Description ConstructorReflectionCode(Constructor<?> constructor, Object[] inputs)
Create a new ConstructorReflectionCode to represent a constructor invocation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
runReflectionCodeRaw()
Execute the reflection code.String
toString()
-
Methods inherited from class randoop.util.ReflectionCode
getExceptionThrown, getReturnValue, hasRun, hasStarted, runReflectionCode, setHasRun, setHasStarted, status
-
-
-
-
Field Detail
-
constructor
private final Constructor<?> constructor
The constructor to be called.
-
inputs
private final Object[] inputs
The arguments that the constructor is applied to. If an inner class constructor has a receiver, it is the first element of this array.
-
-
Constructor Detail
-
ConstructorReflectionCode
public ConstructorReflectionCode(Constructor<?> constructor, Object[] inputs)
Create a new ConstructorReflectionCode to represent a constructor invocation.- Parameters:
constructor
- the constructor to be calledinputs
- the arguments that the constructor is applied to. If an inner class constructor has a receiver, it is the first element of this array.
-
-
Method Detail
-
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
-
-