Package org.aspectj.asm

Examples of org.aspectj.asm.HierarchyWalker


  static public IProgramElement[] getProgramElements(AsmManager model, String filename) {

    IProgramElement file = (IProgramElement) model.getHierarchy().findElementForSourceFile(filename);
    final List nodes = new ArrayList();
    HierarchyWalker walker = new HierarchyWalker() {
      public void preProcess(IProgramElement node) {
        IProgramElement p = (IProgramElement) node;
        if (accept(node))
          nodes.add(p);
      }
View Full Code Here


    return this;
  }

  public String toLongString() {
    final StringBuffer buffer = new StringBuffer();
    HierarchyWalker walker = new HierarchyWalker() {
      private int depth = 0;

      public void preProcess(IProgramElement node) {
        for (int i = 0; i < depth; i++) {
          buffer.append(' ');
        }
        buffer.append(node.toString());
        buffer.append('\n');
        depth += 2;
      }

      public void postProcess(IProgramElement node) {
        depth -= 2;
      }
    };
    walker.process(this);
    return buffer.toString();
  }
View Full Code Here

    return this;
  }

  public String toLongString() {
    final StringBuffer buffer = new StringBuffer();
    HierarchyWalker walker = new HierarchyWalker() {
      private int depth = 0;

      public void preProcess(IProgramElement node) {
        for (int i = 0; i < depth; i++) {
          buffer.append(' ');
        }
        buffer.append(node.toString());
        buffer.append('\n');
        depth += 2;
      }

      public void postProcess(IProgramElement node) {
        depth -= 2;
      }
    };
    walker.process(this);
    return buffer.toString();
  }
View Full Code Here

    return this;
  }

  public String toLongString() {
    final StringBuffer buffer = new StringBuffer();
    HierarchyWalker walker = new HierarchyWalker() {
      private int depth = 0;

      public void preProcess(IProgramElement node) {
        for (int i = 0; i < depth; i++) {
          buffer.append(' ');
        }
        buffer.append(node.toString());
        buffer.append('\n');
        depth += 2;
      }

      public void postProcess(IProgramElement node) {
        depth -= 2;
      }
    };
    walker.process(this);
    return buffer.toString();
  }
View Full Code Here

    return this;
  }
 
  public String toLongString() {
    final StringBuffer buffer = new StringBuffer();
    HierarchyWalker walker = new HierarchyWalker() {
      private int depth = 0;
     
      public void preProcess(IProgramElement node) {
        for (int i = 0; i < depth; i++) buffer.append(' ');
        buffer.append(node.toString());
        buffer.append('\n');
        depth += 2;
      }
     
      public void postProcess(IProgramElement node) {
        depth -= 2;
      }
    };
    walker.process(this);
    return buffer.toString();
  }
View Full Code Here

TOP

Related Classes of org.aspectj.asm.HierarchyWalker

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.