本文整理了Java中org.dom4j.Visitor
类的一些代码示例,展示了Visitor
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Visitor
类的具体详情如下:
包路径:org.dom4j.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);
}
}
内容来源于网络,如有侵权,请联系作者删除!