Package randoop.util

Class MethodReflectionCode


  • public final class MethodReflectionCode
    extends ReflectionCode
    Wraps a method together with its arguments, ready for execution. Can be run only once.
    • Field Detail

      • method

        private final Method method
        The method to be called.
      • receiver

        private final Object receiver
        The receiver, or null for a static method.
      • inputs

        private final Object[] inputs
        The arguments that the method is applied to.
    • 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 called
        receiver - the receiver, or null for a static method
        inputs - 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 class ReflectionCode