Class ClassProxyFactory.MockMethodInterceptor

  • All Implemented Interfaces:
    java.io.Serializable, net.sf.cglib.proxy.Callback, net.sf.cglib.proxy.MethodInterceptor
    Enclosing class:
    ClassProxyFactory

    public static class ClassProxyFactory.MockMethodInterceptor
    extends java.lang.Object
    implements net.sf.cglib.proxy.MethodInterceptor, java.io.Serializable
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.reflect.InvocationHandler handler  
      private java.util.Set<java.lang.reflect.Method> mockedMethods  
      private static long serialVersionUID  
    • Constructor Summary

      Constructors 
      Constructor Description
      MockMethodInterceptor​(java.lang.reflect.InvocationHandler handler)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object intercept​(java.lang.Object obj, java.lang.reflect.Method method, java.lang.Object[] args, net.sf.cglib.proxy.MethodProxy proxy)  
      private void readObject​(java.io.ObjectInputStream stream)  
      void setMockedMethods​(java.lang.reflect.Method... mockedMethods)  
      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
      • mockedMethods

        private transient java.util.Set<java.lang.reflect.Method> mockedMethods
    • Constructor Detail

      • MockMethodInterceptor

        public MockMethodInterceptor​(java.lang.reflect.InvocationHandler handler)
    • Method Detail

      • intercept

        public java.lang.Object intercept​(java.lang.Object obj,
                                          java.lang.reflect.Method method,
                                          java.lang.Object[] args,
                                          net.sf.cglib.proxy.MethodProxy proxy)
                                   throws java.lang.Throwable
        Specified by:
        intercept in interface net.sf.cglib.proxy.MethodInterceptor
        Throws:
        java.lang.Throwable
      • setMockedMethods

        public void setMockedMethods​(java.lang.reflect.Method... mockedMethods)
      • 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