Class PowerMockExpressionEditor


  • public final class PowerMockExpressionEditor
    extends javassist.expr.ExprEditor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void addNewDeferConstructor​(javassist.CtClass clazz)
      Create a defer constructor in the class which will be called when the constructor is suppressed.
      void edit​(javassist.expr.ConstructorCall c)  
      void edit​(javassist.expr.FieldAccess f)  
      void edit​(javassist.expr.MethodCall m)  
      void edit​(javassist.expr.NewExpr e)  
      • Methods inherited from class javassist.expr.ExprEditor

        doit, edit, edit, edit, edit
      • Methods inherited from class java.lang.Object

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

      • clazz

        private final javassist.CtClass clazz
      • mockGetawayClass

        private final java.lang.Class<?> mockGetawayClass
    • Constructor Detail

      • PowerMockExpressionEditor

        public PowerMockExpressionEditor​(TransformStrategy strategy,
                                         javassist.CtClass clazz,
                                         java.lang.Class<?> mockGetawayClass)
    • Method Detail

      • edit

        public void edit​(javassist.expr.NewExpr e)
                  throws javassist.CannotCompileException
        Overrides:
        edit in class javassist.expr.ExprEditor
        Throws:
        javassist.CannotCompileException
      • edit

        public void edit​(javassist.expr.MethodCall m)
                  throws javassist.CannotCompileException
        Overrides:
        edit in class javassist.expr.ExprEditor
        Throws:
        javassist.CannotCompileException
      • edit

        public void edit​(javassist.expr.ConstructorCall c)
                  throws javassist.CannotCompileException
        Overrides:
        edit in class javassist.expr.ExprEditor
        Throws:
        javassist.CannotCompileException
      • edit

        public void edit​(javassist.expr.FieldAccess f)
                  throws javassist.CannotCompileException
        Overrides:
        edit in class javassist.expr.ExprEditor
        Throws:
        javassist.CannotCompileException
      • addNewDeferConstructor

        private void addNewDeferConstructor​(javassist.CtClass clazz)
                                     throws javassist.CannotCompileException
        Create a defer constructor in the class which will be called when the constructor is suppressed.
        Parameters:
        clazz - The class whose super constructor will get a new defer constructor if it doesn't already have one.
        Throws:
        javassist.CannotCompileException - If an unexpected compilation error occurs.