1 /* 2 * reserved comment block 3 * DO NOT REMOVE OR ALTER! 4 */ 5 /* 6 * Copyright 1999-2002,2004 The Apache Software Foundation. 7 * 8 * Licensed under the Apache License, Version 2.0 (the "License"); 9 * you may not use this file except in compliance with the License. 10 * You may obtain a copy of the License at 11 * 12 * http://www.apache.org/licenses/LICENSE-2.0 13 * 14 * Unless required by applicable law or agreed to in writing, software 15 * distributed under the License is distributed on an "AS IS" BASIS, 16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 * See the License for the specific language governing permissions and 18 * limitations under the License. 19 */ 20 21 package com.sun.org.apache.xerces.internal.dom; 22 23 import org.w3c.dom.CharacterData; 24 import org.w3c.dom.Comment; 25 import org.w3c.dom.Node; 26 27 /** 28 * Represents an XML (or HTML) comment. 29 * 30 * @xerces.internal 31 * 32 * @since PR-DOM-Level-1-19980818. 33 */ 34 public class CommentImpl 35 extends CharacterDataImpl 36 implements CharacterData, Comment { 37 38 // 39 // Constants 40 // 41 42 /** Serialization version. */ 43 static final long serialVersionUID = -2685736833408134044L; 44 45 // 46 // Constructors 47 // 48 49 /** Factory constructor. */ 50 public CommentImpl(CoreDocumentImpl ownerDoc, String data) { 51 super(ownerDoc, data); 52 } 53 54 // 55 // Node methods 56 // 57 58 /** 59 * A short integer indicating what type of node this is. The named 60 * constants for this value are defined in the org.w3c.dom.Node interface. 61 */ 62 public short getNodeType() { 63 return Node.COMMENT_NODE; 64 } 65 66 /** Returns the node name. */ 67 public String getNodeName() { 68 return "#comment"; 69 } 70 71 } // class CommentImpl