Package dk.brics.xact.wrappers

Examples of dk.brics.xact.wrappers.WrapperNodeVisitor


    while (!stack.isEmpty()) {
      Entry e = stack.pop();
      switch (e.kind) {
      case START_NODE:
        stack.push(new Entry(Entry.Kind.END_NODE, e.node));
        e.node.visitBy(new WrapperNodeVisitor() {
          @Override public void visit(ElementWrapper w) {
            if (w.getFirstAttrWrapper() != null)
              stack.push(new Entry(Entry.Kind.START_NODE, w.getFirstAttrWrapper()));
            if (w.getFirstChildWrapper() != null)
              stack.push(new Entry(Entry.Kind.START_NODE, w.getFirstChildWrapper()));
          }
        });
        e.node.visitBy(new WrapperNodeVisitor() {
          @Override public void visit(AttrNodeWrapper<? extends AttrNode> w) {
            if (w.getNextAttrWrapper() != null)
              stack.push(new Entry(Entry.Kind.START_NODE, w.getNextAttrWrapper()));
          }
          @Override public void visit(TempNodeWrapper<? extends TempNode> w) {
            if (w.getNextSiblingWrapper() != null)
              stack.push(new Entry(Entry.Kind.START_NODE, w.getNextSiblingWrapper()));
          }
        });
        break;
      case END_NODE:
        e.node.visitBy(new WrapperNodeVisitor() {
          @Override public void visit(AttributeGapWrapper w) {
            w.setReal(w.getReal().copy(w.getRealNextAttr()));
          }
          @Override public void visit(AttributeWrapper w) {
            w.setReal(w.getReal().copy(w.getRealNextAttr()));
View Full Code Here

TOP

Related Classes of dk.brics.xact.wrappers.WrapperNodeVisitor

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.