Package randoop.util

Class ConstructorReflectionCode


  • public final class ConstructorReflectionCode
    extends ReflectionCode
    Wraps a constructor together with its arguments, ready for execution. Can be run only once.
    • 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 called
        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.
    • 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 class ReflectionCode