Class Invocation

java.lang.Object
org.easymock.internal.Invocation
All Implemented Interfaces:
Serializable

public final class Invocation extends Object implements Serializable
Represents a method invocation on a mock object. It's used for record one or for actual calls.
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • NO_ARGS

      private static final Object[] NO_ARGS
    • mock

      private final Object mock
    • method

      private transient Method method
    • arguments

      private final Object[] arguments
    • currentCaptures

      private final Collection<Captures<?>> currentCaptures
  • Constructor Details

  • Method Details

    • expandVarArgs

      private static Object[] expandVarArgs(boolean isVarArgs, Object[] args)
    • createObjectArray

      private static Object[] createObjectArray(Object array)
    • getMock

      public Object getMock()
      Returns the mock object on which the invocation was performed.
      Returns:
      the mock object on which the invocation was performed.
    • getMethod

      public Method getMethod()
      Returns the method invoked on the mock object.
      Returns:
      the method invoked on the mock object.
    • getArguments

      public Object[] getArguments()
      Returns the arguments passed to the method invocation.
      Returns:
      the arguments passed to the method invocation.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equalArguments

      private boolean equalArguments(Object[] arguments)
    • isPrimitiveParameter

      private boolean isPrimitiveParameter(int parameterPosition)
    • getMockAndMethodName

      public String getMockAndMethodName()
    • addCapture

      public void addCapture(Captures<Object> capture, Object value)
    • validateCaptures

      public void validateCaptures()
    • clearCaptures

      public void clearCaptures()
    • toStringIsDefined

      private boolean toStringIsDefined(Object o)
    • isDefaultName

      private static boolean isDefaultName(String mockName)
    • readObject

      private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException
      Throws:
      IOException
      ClassNotFoundException
    • writeObject

      private void writeObject(ObjectOutputStream stream) throws IOException
      Throws:
      IOException