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