KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > xquark > xquery > typing > QTypeComment


1 /*
2  * This file belongs to the XQuark distribution.
3  * Copyright (C) 2003 Universite de Versailles Saint-Quentin.
4  * Copyright (C) 2003 XQuark Group.
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307.
19  * You can also get it at http://www.gnu.org/licenses/lgpl.html
20  *
21  * For more information on this software, see http://www.xquark.org.
22  */

23
24 /*
25  * QTypeComment.java
26  *
27  * Created on 25 juin 2002, 17:45
28  */

29
30 package org.xquark.xquery.typing;
31
32 import org.xquark.xquery.parser.XQueryException;
33
34 public class QTypeComment extends QTypeNode implements QTypeVisitable {
35     private static final String JavaDoc RCSRevision = "$Revision: 1.1 $";
36     private static final String JavaDoc RCSName = "$Name: $";
37
38     // #############################################################################
39
// CONSTRUCTOR STUFF
40
// #############################################################################
41

42     public QTypeComment() {
43         subclass = COMMENT;
44         occurence = OCC_1_1;
45     }
46     public QTypeComment(byte occurence) {
47         subclass = COMMENT;
48         this.occurence = occurence;
49     }
50
51     // #############################################################################
52
// VISITOR STUFF
53
// #############################################################################
54

55     public void accept(QTypeVisitor visitor) throws XQueryException {
56         visitor.visit(this);
57     }
58
59     // #############################################################################
60
// ATTRIBUTE ACCESS STUFF
61
// #############################################################################
62

63     // equals
64
public boolean equals(Object JavaDoc qtype) {
65         if (!(qtype instanceof QTypeComment))
66             return false;
67 // if (((QTypeComment) qtype).getOccurence() != occurence)
68
// return false;
69
return true;
70     }
71
72     // tells whether qtype is a node
73
public boolean isNode() {
74         return true;
75     }
76
77     // clone
78
public Object JavaDoc clone() throws CloneNotSupportedException JavaDoc {
79         QTypeComment newObj = new QTypeComment(occurence);
80         return newObj;
81     }
82     // print
83
public String JavaDoc toSimpleString() {
84         return "QTypeComment()";
85     }
86
87     public String JavaDoc toString() {
88         return "QTypeComment()";
89     }
90 }
91
Popular Tags