Class DotGraphUtils

java.lang.Object
jadx.core.utils.DotGraphUtils

public class DotGraphUtils extends Object
  • Field Details

    • NL

      private static final String NL
      See Also:
    • NLQR

      private static final String NLQR
    • MAX_REGION_NAME_LENGTH

      private static final int MAX_REGION_NAME_LENGTH
      See Also:
    • dot

      private final ICodeWriter dot
    • conn

      private final ICodeWriter conn
    • useRegions

      private final boolean useRegions
    • rawInsn

      private final boolean rawInsn
    • highlightRegion

      private Optional<IRegion> highlightRegion
    • processedHighlightRegion

      private boolean processedHighlightRegion
  • Constructor Details

    • DotGraphUtils

      public DotGraphUtils(boolean useRegions, boolean rawInsn)
    • DotGraphUtils

      public DotGraphUtils(boolean useRegions, boolean rawInsn, Optional<IRegion> highlightRegion)
  • Method Details

    • getOutDir

      public static File getOutDir(MethodNode mth)
    • getFullFile

      public File getFullFile(MethodNode mth)
    • getFullFile

      public File getFullFile(MethodNode mth, File outDir)
    • dumpToFile

      public void dumpToFile(MethodNode mth)
    • dumpToFile

      public void dumpToFile(MethodNode mth, File dir)
    • dumpToString

      @Nullable public @Nullable String dumpToString(MethodNode mth)
    • processMethodRegion

      private void processMethodRegion(MethodNode mth)
    • processRegion

      private void processRegion(MethodNode mth, IContainer region, Set<IBlock> regionsBlocks)
    • getColorForRegion

      private String getColorForRegion(IRegion region)
    • truncateRegionName

      private String truncateRegionName(IRegion r)
    • checkAndFixFloatingBlocks

      private void checkAndFixFloatingBlocks(MethodNode mth, BlockNode block, Set<IBlock> regionBlocks)
      A block is floating if it exists in no regions at all. These are placed in a region that makes sense for generation of this graph only, because otherwise the generated graph is unreadable.
    • processBlock

      private void processBlock(MethodNode mth, BlockNode block)
    • processBlock

      private void processBlock(MethodNode mth, BlockNode block, boolean error, boolean pseudoInRegion)
    • processIBlock

      private void processIBlock(MethodNode mth, IBlock block)
    • processIBlock

      private void processIBlock(MethodNode mth, IBlock block, boolean error)
    • addEdge

      private void addEdge(BlockNode from, BlockNode to, String style)
    • attributesString

      private String attributesString(IAttributeNode block)
    • makeName

      private String makeName(IContainer c)
    • insertInsns

      private String insertInsns(MethodNode mth, IBlock block)
    • escape

      public static String escape(Object obj)
    • escape

      public static String escape(String string)
    • escape

      public static String escape(String string, String newline)
    • classFormatName

      public static String classFormatName(ClassNode cls, boolean longName)
    • classFormatName

      public static String classFormatName(ClassInfo cls, boolean longName)
    • methodFormatName

      public static String methodFormatName(JavaMethod javaMethod, boolean longName)
    • methodFormatName

      public static String methodFormatName(MethodNode methodNode, boolean longName)
    • unresolvedMethodFormatName

      public static String unresolvedMethodFormatName(MethodInfo mthInfo, boolean longName)
    • interfaceFormatName

      public static String interfaceFormatName(ArgType iface, ClassNode cls, boolean longName)
    • argTypeFormatName

      public static String argTypeFormatName(ArgType arg, ClassNode cls, boolean longName)
    • formatColor

      public static String formatColor(Color color)
    • toDotNodeName

      public static String toDotNodeName(String fullName)