Class CodeNodeUtil

java.lang.Object
com.pnfsoftware.jeb.core.output.tree.CodeNodeUtil

public class CodeNodeUtil extends Object
Convenience methods to filter ICodeNodes.
  • Field Details

  • Constructor Details

    • CodeNodeUtil

      public CodeNodeUtil()
  • Method Details

    • meetsConditions

      public static boolean meetsConditions(ICodeNode node, int included, int excluded)
      Verify if this node meets the provided criteria. Refer to the IS_xxx possible flags returned by #getItemFlags().
      Parameters:
      node - node to be tested
      included - these flags MUST be set
      excluded - these flags MUST NOT be set
      Returns:
      true iff the node meets the required conditions
    • mustBe

      public static boolean mustBe(ICodeNode node, int flags)
    • cannotBe

      public static boolean cannotBe(ICodeNode node, int flags)
    • getChildren

      public static List<ICodeNode> getChildren(ICodeNode node, int included, int excluded)
      Get the children nodes that meet the provided criteria. Refer to the IS_xxx possible flags returned by #getItemFlags().
      Parameters:
      node - parent code node
      included - if non-0, candidates children MUST have the flags set
      excluded - if non-0, candidates children MUST NOT have the flags set
      Returns:
      the list of children
    • hasChildren

      public static boolean hasChildren(ICodeNode node, int included, int excluded)
    • getPackageNameFromHierarchy

      public static String getPackageNameFromHierarchy(ICodeNode node)
      Get full package name from hierarchy, e.g. package 'bar' located in packages std->foo is named 'std::foo::bar'.
      Returns:
      full package name using C++ separator, null if node is not a package