Class AbstractMainMockTransformer.PowerMockExpressionEditor
- java.lang.Object
-
- javassist.expr.ExprEditor
-
- org.powermock.core.transformers.impl.AbstractMainMockTransformer.PowerMockExpressionEditor
-
- Enclosing class:
- AbstractMainMockTransformer
protected final class AbstractMainMockTransformer.PowerMockExpressionEditor extends javassist.expr.ExprEditor
-
-
Field Summary
Fields Modifier and Type Field Description private javassist.CtClass
clazz
-
Constructor Summary
Constructors Modifier Constructor Description protected
PowerMockExpressionEditor(javassist.CtClass clazz)
-
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)
private boolean
shouldTreatAsSystemClassCall(javassist.CtClass declaringClass)
-
-
-
Method Detail
-
edit
public void edit(javassist.expr.FieldAccess f) throws javassist.CannotCompileException
- Overrides:
edit
in classjavassist.expr.ExprEditor
- Throws:
javassist.CannotCompileException
-
edit
public void edit(javassist.expr.MethodCall m) throws javassist.CannotCompileException
- Overrides:
edit
in classjavassist.expr.ExprEditor
- Throws:
javassist.CannotCompileException
-
shouldTreatAsSystemClassCall
private boolean shouldTreatAsSystemClassCall(javassist.CtClass declaringClass)
-
edit
public void edit(javassist.expr.ConstructorCall c) throws javassist.CannotCompileException
- Overrides:
edit
in classjavassist.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.
-
edit
public void edit(javassist.expr.NewExpr e) throws javassist.CannotCompileException
- Overrides:
edit
in classjavassist.expr.ExprEditor
- Throws:
javassist.CannotCompileException
-
-