Class SymbolPathParser

java.lang.Object
ghidra.app.util.SymbolPathParser

public class SymbolPathParser extends Object
A parser for breaking down namespaces in the presence of complicating factors such as templates.

For example, if a SymbolPath is constructed with "foo<int, blah::hah>::bar::baz", then "baz" is the name of a symbol in the "bar" namespace, which is in the "foo<int, blah::hah>" namespace.

  • Constructor Details

    • SymbolPathParser

      public SymbolPathParser()
  • Method Details

    • parse

      public static List<String> parse(String name)
      Parses a String pathname into its constituent namespace and name components. The list does not contain the global namespace, which is implied, but then has each more deeply nested namespace contained in order in the list, followed by the trailing name.
      Parameters:
      name - The input String to be parsed.
      Returns:
      List<String> containing the sequence of namespaces and trailing name.
    • parse

      public static List<String> parse(String name, boolean ignoreLeaderParens)
      Parses a String pathname into its constituent namespace and name components. The list does not contain the global namespace, which is implied, but then has each more deeply nested namespace contained in order in the list, followed by the trailing name.
      Parameters:
      name - The input String to be parsed.
      ignoreLeaderParens - true signals to ignore any string that starts with a '(' char. This is useful to work around some problem characters.
      Returns:
      List<String> containing the sequence of namespaces and trailing name.