org.dom4j.Visitor类的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(3.3k)|赞(0)|评价(0)|浏览(81)

本文整理了Java中org.dom4j.Visitor类的一些代码示例,展示了Visitor类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Visitor类的具体详情如下:
包路径:org.dom4j.Visitor
类名称:Visitor

Visitor介绍

[英]Visitor is used to implement the Visitor pattern in DOM4J. An object of this interface can be passed to a Node which will then call its typesafe methods. Please refer to the Gang of Four book of Design Patterns for more details on the Visitor pattern. This site has further discussion on design patterns and links to the GOF book. This link describes the Visitor pattern in detail.
[中]Visitor用于在DOM4J中实现Visitor模式。此接口的对象可以传递给Node,然后Node将调用其类型安全方法。有关Visitor模式的更多详细信息,请参阅四人帮设计模式手册。这本{$0$}对设计模式进行了进一步讨论,并链接到了GOF书籍。这个link详细描述了访问者模式。

代码示例

代码示例来源:origin: org.dom4j/dom4j

public void accept(Visitor visitor) {
    visitor.visit(this);
  }
}

代码示例来源:origin: org.dom4j/dom4j

public void accept(Visitor visitor) {
    visitor.visit(this);
  }
}

代码示例来源:origin: org.dom4j/dom4j

public void accept(Visitor visitor) {
    visitor.visit(this);
  }
}

代码示例来源:origin: org.dom4j/dom4j

public void accept(Visitor visitor) {
    visitor.visit(this);
  }
}

代码示例来源:origin: org.dom4j/dom4j

public void accept(Visitor visitor) {
    visitor.visit(this);
  }
}

代码示例来源:origin: org.dom4j/dom4j

public void accept(Visitor visitor) {
  visitor.visit(this);
}

代码示例来源:origin: org.dom4j/dom4j

public void accept(Visitor visitor) {
  visitor.visit(this);
}

代码示例来源:origin: org.dom4j/dom4j

public void accept(Visitor visitor) {
  visitor.visit(this);
}

代码示例来源:origin: org.dom4j/dom4j

/**
 * <p>
 * <code>accept</code> method is the <code>Visitor Pattern</code>
 * method.
 * </p>
 * 
 * @param visitor
 *            <code>Visitor</code> is the visitor.
 */
public void accept(Visitor visitor) {
  visitor.visit(this);
  DocumentType docType = getDocType();
  if (docType != null) {
    visitor.visit(docType);
  }
  // visit content
  List<Node> content = content();
  if (content != null) {
    for (Node node : content) {
      node.accept(visitor);
    }
  }
}

代码示例来源:origin: org.dom4j/dom4j

/**
 * <p>
 * <code>accept</code> method is the <code>Visitor Pattern</code>
 * method.
 * </p>
 *
 * @param visitor <code>Visitor</code> is the visitor.
 */
public void accept(Visitor visitor) {
  visitor.visit(this);
  // visit attributes
  for (int i = 0, size = attributeCount(); i < size; i++) {
    Attribute attribute = attribute(i);
    visitor.visit(attribute);
  }
  // visit content
  for (int i = 0, size = nodeCount(); i < size; i++) {
    Node node = node(i);
    node.accept(visitor);
  }
}

代码示例来源:origin: dom4j/dom4j

public void accept(Visitor visitor) {
    visitor.visit(this);
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j

public void accept(Visitor visitor) {
    visitor.visit(this);
  }
}

代码示例来源:origin: dom4j/dom4j

public void accept(Visitor visitor) {
    visitor.visit(this);
  }
}

代码示例来源:origin: dom4j/dom4j

public void accept(Visitor visitor) {
    visitor.visit(this);
  }
}

代码示例来源:origin: dom4j/dom4j

public void accept(Visitor visitor) {
    visitor.visit(this);
  }
}

代码示例来源:origin: dom4j/dom4j

public void accept(Visitor visitor) {
    visitor.visit(this);
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j

public void accept(Visitor visitor) {
    visitor.visit(this);
  }
}

代码示例来源:origin: org.dom4j/com.springsource.org.dom4j

public void accept(Visitor visitor) {
    visitor.visit(this);
  }
}

代码示例来源:origin: org.dom4j/com.springsource.org.dom4j

public void accept(Visitor visitor) {
    visitor.visit(this);
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j

public void accept(Visitor visitor) {
    visitor.visit(this);
  }
}

相关文章