public class

CodeUtil

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

Class Overview

Utility routines for code units.

Summary

Public Constructors
CodeUtil()
Public Methods
static List<ICodeClass> collectClasses(ICodeUnit unit, boolean internal, boolean topLevel, Pattern addressFilter)
Collect classes.
static List<ICodeMethod> collectMethods(ICodeUnit unit, boolean internal, boolean topLevel, Pattern addressFilter)
Collect methods.
static IAddressableDigraphBuilder createCallgraphBuilder(ICodeUnit unit)
static String findCodeItemReference(ICodeUnit unit, ICodeItem item, int pos)
static ICodeField getFieldByName(ICodeUnit unit, String partialName, boolean failIfAmbiguous)
Get a field by name.
static ICodeMethod getMethodByName(ICodeUnit unit, String partialName, boolean failIfAmbiguous)
Get a method/routine by name.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public CodeUtil ()

Public Methods

public static List<ICodeClass> collectClasses (ICodeUnit unit, boolean internal, boolean topLevel, Pattern addressFilter)

Collect classes.

Parameters
internal true to collect internal classes only
topLevel true to collect non-inner classes only
addressFilter optional filter on getAddress()

public static List<ICodeMethod> collectMethods (ICodeUnit unit, boolean internal, boolean topLevel, Pattern addressFilter)

Collect methods.

Parameters
internal true to collect internal methods only
topLevel true to collect orphaned methods only (not belonging to any class)
addressFilter optional filter on getAddress()

public static IAddressableDigraphBuilder createCallgraphBuilder (ICodeUnit unit)

public static String findCodeItemReference (ICodeUnit unit, ICodeItem item, int pos)

public static ICodeField getFieldByName (ICodeUnit unit, String partialName, boolean failIfAmbiguous)

Get a field by name.

public static ICodeMethod getMethodByName (ICodeUnit unit, String partialName, boolean failIfAmbiguous)

Get a method/routine by name.