View Javadoc

1   /*
2    * Copyright 2001-2004 (C) MetaStuff, Ltd. All Rights Reserved.
3    * 
4    * This software is open source. 
5    * See the bottom of this file for the licence.
6    * 
7    * $Id: VisitorSupport.java,v 1.4 2004/06/25 08:03:33 maartenc Exp $
8    */
9   
10  package org.dom4j;
11  
12  /*** <p><code>VisitorSupport</code> is an abstract base class
13    * which is useful for implementation inheritence or when using anonymous 
14    * inner classes to create simple <code>Visitor</code>
15    * implementations.</p>
16    *
17    * @author <a href="mailto:james.strachan@metastuff.com">James Strachan</a>
18    * @version $Revision: 1.4 $
19    */
20  public abstract class VisitorSupport implements Visitor {
21      
22      public VisitorSupport() {
23      }
24  
25      public void visit(Document document) {
26      }
27  
28      public void visit(DocumentType documentType) {
29      }
30      
31      public void visit(Element node) {
32      }
33  
34      public void visit(Attribute node) {
35      }
36  
37      public void visit(CDATA node) {
38      }
39  
40      public void visit(Comment node) {
41      }
42  
43      public void visit(Entity node) {
44      }
45  
46      public void visit(Namespace namespace) {
47      }
48  
49      public void visit(ProcessingInstruction node) {
50      }
51  
52      public void visit(Text node) {
53      }
54  
55  }
56  
57  
58  
59  
60  /*
61   * Redistribution and use of this software and associated documentation
62   * ("Software"), with or without modification, are permitted provided
63   * that the following conditions are met:
64   *
65   * 1. Redistributions of source code must retain copyright
66   *    statements and notices.  Redistributions must also contain a
67   *    copy of this document.
68   *
69   * 2. Redistributions in binary form must reproduce the
70   *    above copyright notice, this list of conditions and the
71   *    following disclaimer in the documentation and/or other
72   *    materials provided with the distribution.
73   *
74   * 3. The name "DOM4J" must not be used to endorse or promote
75   *    products derived from this Software without prior written
76   *    permission of MetaStuff, Ltd.  For written permission,
77   *    please contact dom4j-info@metastuff.com.
78   *
79   * 4. Products derived from this Software may not be called "DOM4J"
80   *    nor may "DOM4J" appear in their names without prior written
81   *    permission of MetaStuff, Ltd. DOM4J is a registered
82   *    trademark of MetaStuff, Ltd.
83   *
84   * 5. Due credit should be given to the DOM4J Project - 
85   *    http://www.dom4j.org
86   *
87   * THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS
88   * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
89   * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
90   * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
91   * METASTUFF, LTD. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
92   * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
93   * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
94   * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
95   * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
96   * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
97   * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
98   * OF THE POSSIBILITY OF SUCH DAMAGE.
99   *
100  * Copyright 2001-2004 (C) MetaStuff, Ltd. All Rights Reserved.
101  *
102  * $Id: VisitorSupport.java,v 1.4 2004/06/25 08:03:33 maartenc Exp $
103  */