View Javadoc

1   ////////////////////////////////////////////////////////////////////////////////
2   // MillScript-XML: an Open Spice interpreter and batch website creation tool
3   // Copyright (C) 2005 Kevin Rogers
4   //
5   // This file is part of MillScript-XML.
6   //
7   // MillScript-XML is free software; you can redistribute it and/or modify it under
8   // the terms of the GNU General Public License as published by the Free
9   // Software Foundation; either version 2 of the License, or (at your option)
10  // any later version.
11  //
12  // MillScript-XML is distributed in the hope that it will be useful, but WITHOUT
13  // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14  // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
15  // more details.
16  //
17  // You should have received a copy of the GNU General Public License along with
18  // MillScript-XML; if not, write to the Free Software Foundation, Inc., 59 Temple
19  // Place, Suite 330, Boston, MA  02111-1307  USA
20  ////////////////////////////////////////////////////////////////////////////////
21  package org.millscript.commons.xml.api.token;
22  
23  /**
24   * This interface is used to allow tokens to implement the visitor pattern.
25   */
26  public interface TokenVisitor {
27  
28      /**
29       * Visit the specified attribute declaration token.
30       *
31       * @param token the attribute declaration token to visit
32       */
33      void visit( final AttListDeclToken token );
34  
35      /**
36       * Visit the specified character data token.
37       *
38       * @param token the character data token to visit
39       */
40      void visit( final CharDataToken token );
41  
42      /**
43       * Visit the specified comment token.
44       *
45       * @param token the comment token to visit
46       */
47      void visit( final CommentToken token );
48  
49      /**
50       * Visit the specified dtd token.
51       *
52       * @param token the dtd token to visit
53       */
54      void visit( final DTDToken token );
55  
56      /**
57       * Visit the specified element declaration token.
58       *
59       * @param token the element declaration token to visit
60       */
61      void visit( final ElementDeclToken token );
62  
63      /**
64       * Visit the specified empty element token.
65       *
66       * @param token the empty element token to visit
67       */
68      void visit( final EmptyElementToken token );
69  
70      /**
71       * Visit the specified end tag token.
72       *
73       * @param token the end tag token to visit
74       */
75      void visit( final EndTagToken token );
76  
77      /**
78       * Visit the specified entity declaration token.
79       *
80       * @param token the entity declaration token to visit
81       */
82      void visit( final EntityDeclToken token );
83  
84      /**
85       * Visit the specified notation declaration token.
86       *
87       * @param token the notation declaration token to visit
88       */
89      void visit( final NotationDeclToken token );
90  
91      /**
92       * Visit the specified processing instruction token.
93       *
94       * @param token the processing instruction token to visit
95       */
96      void visit( final PIToken token );
97  
98      /**
99       * Visit the specified start tag token.
100      *
101      * @param token the start tag token to visit
102      */
103     void visit( final StartTagToken token );
104 
105     /**
106      * Visit the specified xml declaration token.
107      *
108      * @param token the xml declaration token to visit
109      */
110     void visit( final XmlDeclToken token );
111 
112 }