Package org.eclipse.php.internal.core.ast.visitor

Examples of org.eclipse.php.internal.core.ast.visitor.ApplyAll


  }

  public <T extends ASTNode> List<T> getAllOfType(Program program,
      final String className) {
    final List<T> list = new ArrayList<T>();
    program.accept(new ApplyAll() {
      @SuppressWarnings("unchecked")
      protected boolean apply(ASTNode node) {
        if (node.getClass().getName().equals(className)) {
          list.add((T) node);
        }
View Full Code Here


  }

  public <T extends ASTNode> List<T> getAllOfType(Program program,
      final Class<T> nodeClass) {
    final List<T> list = new ArrayList<T>();
    program.accept(new ApplyAll() {
      @SuppressWarnings("unchecked")
      protected boolean apply(ASTNode node) {
        if (node.getClass() == nodeClass) {
          list.add((T) node);
        }
View Full Code Here

  }

  public <T extends ASTNode> List<T> getAllOfType(Program program,
      final Class<T> nodeClass) {
    final List<T> list = new ArrayList<T>();
    program.accept(new ApplyAll() {
      @SuppressWarnings("unchecked")
      protected boolean apply(ASTNode node) {
        if (node.getClass() == nodeClass) {
          list.add((T) node);
        }
View Full Code Here

   */
  public static void setFlagsToAST(ASTNode root, final int flags) {
    if (root == null) {
      return;
    }
    root.accept(new ApplyAll() {
      protected boolean apply(ASTNode node) {
        node.setFlags(node.getFlags() | flags);
        return true;
      }
    });
View Full Code Here

TOP

Related Classes of org.eclipse.php.internal.core.ast.visitor.ApplyAll

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.