Class ClassMockingData

  • All Implemented Interfaces:
    java.io.Serializable

    public final class ClassMockingData
    extends java.lang.Object
    implements java.io.Serializable
    Class containing the data required for a class mock to work.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.reflect.InvocationHandler handler
      Invocation handler that will intercept all calls
      private java.util.Set<java.lang.reflect.Method> mockedMethods
      List of mocked methods.
      private static long serialVersionUID  
    • Constructor Summary

      Constructors 
      Constructor Description
      ClassMockingData​(java.lang.reflect.InvocationHandler handler, java.lang.reflect.Method... mockedMethods)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.reflect.InvocationHandler handler()  
      boolean isMocked​(java.lang.reflect.Method method)  
      private void readObject​(java.io.ObjectInputStream stream)  
      private void writeObject​(java.io.ObjectOutputStream stream)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • handler

        private final java.lang.reflect.InvocationHandler handler
        Invocation handler that will intercept all calls
      • mockedMethods

        private transient java.util.Set<java.lang.reflect.Method> mockedMethods
        List of mocked methods. Null is everything is mocked. Abstract methods won't appear in this list since they are always mocked.
    • Constructor Detail

      • ClassMockingData

        public ClassMockingData​(java.lang.reflect.InvocationHandler handler,
                                java.lang.reflect.Method... mockedMethods)
    • Method Detail

      • isMocked

        public boolean isMocked​(java.lang.reflect.Method method)
      • handler

        public java.lang.reflect.InvocationHandler handler()
      • readObject

        private void readObject​(java.io.ObjectInputStream stream)
                         throws java.io.IOException,
                                java.lang.ClassNotFoundException
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • writeObject

        private void writeObject​(java.io.ObjectOutputStream stream)
                          throws java.io.IOException
        Throws:
        java.io.IOException