Class ErrorCollector

  • All Implemented Interfaces:
    net.sf.cglib.proxy.Callback, net.sf.cglib.proxy.MethodInterceptor

    public class ErrorCollector
    extends java.lang.Object
    implements net.sf.cglib.proxy.MethodInterceptor
    Collects error messages of all AssertionErrors thrown by the proxied method.
    • Field Detail

      • INTERCEPT_METHOD_NAME

        private static final java.lang.String INTERCEPT_METHOD_NAME
        See Also:
        Constant Field Values
      • CLASS_NAME

        private static final java.lang.String CLASS_NAME
      • errors

        private final java.util.List<java.lang.Throwable> errors
    • Constructor Detail

      • ErrorCollector

        public ErrorCollector()
    • 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
      • addError

        public void addError​(java.lang.Throwable error)
      • errors

        public java.util.List<java.lang.Throwable> errors()
      • wasSuccess

        public boolean wasSuccess()
      • isNestedErrorCollectorProxyCall

        private boolean isNestedErrorCollectorProxyCall()
      • countErrorCollectorProxyCalls

        private static int countErrorCollectorProxyCalls()