Class ASTNameCollector

java.lang.Object
org.eclipse.cdt.core.dom.ast.ASTVisitor
org.eclipse.cdt.core.dom.ast.ASTNameCollector

public final class ASTNameCollector extends ASTVisitor
A convenience visitor that collects names.
Since:
5.1
  • Constructor Details

    • ASTNameCollector

      public ASTNameCollector(char[] name)
      Constructs a name collector for the given name.
    • ASTNameCollector

      public ASTNameCollector(String name)
      Constructs a name collector for the given name.
  • Method Details

    • visit

      public int visit(IASTName name)
      Overrides:
      visit in class ASTVisitor
    • getNames

      public IASTName[] getNames()
      Returns the array of matching names.
    • clear

      public void clear()
      Clears the names found, such that the collector can be reused.