KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > saxon > tree > CommentImpl


1 package net.sf.saxon.tree;
2 import net.sf.saxon.event.Receiver;
3 import net.sf.saxon.trans.XPathException;
4 import net.sf.saxon.type.Type;
5
6 /**
7   * CommentImpl is an implementation of a Comment node
8   * @author Michael H. Kay
9   */

10
11
12 final class CommentImpl extends NodeImpl {
13
14     String JavaDoc comment;
15
16     public CommentImpl(String JavaDoc content) {
17         this.comment = content;
18     }
19
20     public final String JavaDoc getStringValue() {
21         return comment;
22     }
23
24     public final int getNodeKind() {
25         return Type.COMMENT;
26     }
27
28     /**
29     * Copy this node to a given outputter
30     */

31
32     public void copy(Receiver out, int whichNamespaces, boolean copyAnnotations, int locationId) throws XPathException {
33         out.comment(comment, locationId, 0);
34     }
35
36 }
37
38
39 //
40
// The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License");
41
// you may not use this file except in compliance with the License. You may obtain a copy of the
42
// License at http://www.mozilla.org/MPL/
43
//
44
// Software distributed under the License is distributed on an "AS IS" basis,
45
// WITHOUT WARRANTY OF ANY KIND, either express or implied.
46
// See the License for the specific language governing rights and limitations under the License.
47
//
48
// The Original Code is: all this file.
49
//
50
// The Initial Developer of the Original Code is Michael H. Kay.
51
//
52
// Portions created by (your name) are Copyright (C) (your legal entity). All Rights Reserved.
53
//
54
// Contributor(s): none.
55
//
56
Popular Tags