1 /* FOREGEJ - FOrmatting REfactoring GEnerating Java
2 *
3 * Copyright (C) 2003 Andreas Arrgard
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19 package com.octagroup.foregej.html;
20 import antlr.collections.AST;
21 import com.octagroup.foregej.antlr.BaseAST;
22 import com.octagroup.foregej.antlr.NodeWriter;
23 /***
24 */
25 public class HtmlAST extends BaseAST
26 {
27 /***
28 * @param nw
29 */
30 public void write(NodeWriter nw)
31 {
32 nw.write(getText());
33 writeChildren(nw);
34 }
35 /***
36 * @param nw
37 */
38 public void writeChildren(NodeWriter nw)
39 {
40 AST node=getFirstChild();
41 while(node!=null){
42 nw.write(node);
43 node=node.getNextSibling();
44 }
45 }
46 /***
47 * @return
48 */
49 public String toString()
50 {
51 HtmlNodeWriter nw=new HtmlNodeWriter();
52 nw.write(this);
53 return nw.toString();
54 }
55 }
This page was automatically generated by Maven