Search in sources :

Example 11 with ICodeWriter

use of jadx.api.ICodeWriter in project jadx by skylot.

the class DebugUtils method printRegion.

public static void printRegion(MethodNode mth, IRegion region, boolean printInsns) {
    ICodeWriter cw = new SimpleCodeWriter();
    cw.startLine('|').add(mth.toString());
    printRegion(mth, region, cw, "|  ", printInsns);
    LOG.debug("{}{}", ICodeWriter.NL, cw.finish().getCodeStr());
}
Also used : SimpleCodeWriter(jadx.api.impl.SimpleCodeWriter) ICodeWriter(jadx.api.ICodeWriter)

Aggregations

ICodeWriter (jadx.api.ICodeWriter)11 SimpleCodeWriter (jadx.api.impl.SimpleCodeWriter)6 InsnNode (jadx.core.dex.nodes.InsnNode)4 MethodNode (jadx.core.dex.nodes.MethodNode)4 CodegenException (jadx.core.utils.exceptions.CodegenException)4 InsnCodeOffset (jadx.api.data.annotations.InsnCodeOffset)3 MethodGen (jadx.core.codegen.MethodGen)3 AType (jadx.core.dex.attributes.AType)3 MethodOverrideAttr (jadx.core.dex.attributes.nodes.MethodOverrideAttr)3 IDexTreeVisitor (jadx.core.dex.visitors.IDexTreeVisitor)3 CommentsLevel (jadx.api.CommentsLevel)2 ICodeInfo (jadx.api.ICodeInfo)2 VarDeclareRef (jadx.api.data.annotations.VarDeclareRef)2 AccessFlags (jadx.api.plugins.input.data.AccessFlags)2 EncodedValue (jadx.api.plugins.input.data.annotations.EncodedValue)2 JadxAttrType (jadx.api.plugins.input.data.attributes.JadxAttrType)2 AnnotationMethodParamsAttr (jadx.api.plugins.input.data.attributes.types.AnnotationMethodParamsAttr)2 Consts (jadx.core.Consts)2 Jadx (jadx.core.Jadx)2 InsnGen (jadx.core.codegen.InsnGen)2