Class CodeUtil

java.lang.Object
com.pnfsoftware.jeb.core.units.code.CodeUtil

public class CodeUtil extends Object
Utility routines for code units.
  • Constructor Details

    • CodeUtil

      public CodeUtil()
  • Method Details

    • findCodeItemReference

      public static String findCodeItemReference(ICodeUnit unit, ICodeItem item, int pos)
      Parameters:
      unit -
      item -
      pos -
      Returns:
    • getMethodByName

      public static ICodeMethod getMethodByName(ICodeUnit unit, String partialName, boolean failIfAmbiguous)
      Get a method/routine by name.
      Parameters:
      unit -
      partialName -
      failIfAmbiguous -
      Returns:
    • getFieldByName

      public static ICodeField getFieldByName(ICodeUnit unit, String partialName, boolean failIfAmbiguous)
      Get a field by name.
      Parameters:
      unit -
      partialName -
      failIfAmbiguous -
      Returns:
    • collectClasses

      public static List<ICodeClass> collectClasses(ICodeUnit unit, boolean internal, boolean topLevel, Pattern addressFilter)
      Collect classes.
      Parameters:
      unit -
      internal - true to collect internal classes only
      topLevel - true to collect non-inner classes only
      addressFilter - optional filter on ICodeItem.getAddress()
      Returns:
    • collectMethods

      public static List<ICodeMethod> collectMethods(ICodeUnit unit, boolean internal, boolean topLevel, Pattern addressFilter)
      Collect methods.
      Parameters:
      unit -
      internal - true to collect internal methods only
      topLevel - true to collect orphaned methods only (not belonging to any class)
      addressFilter - optional filter on ICodeItem.getAddress()
      Returns:
    • createCallgraphBuilder

      public static IAddressableDigraphBuilder createCallgraphBuilder(ICodeUnit unit)
      Parameters:
      unit -
      Returns: