removed unused private methods.
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / core / dom / BlockComment.java
1 /*******************************************************************************
2  * Copyright (c) 2004, 2008 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  *******************************************************************************/
11 package net.sourceforge.phpdt.core.dom;
12
13 import java.util.ArrayList;
14 import java.util.List;
15
16 /**
17  * Block comment AST node type.
18  * <p>
19  * Block comments (also called "traditional" comments in JLS 3.7)
20  * begin with "/&#42;", may contain line breaks, and must end
21  * with "&#42;/". Following the definition in the JLS (first edition
22  * but not second edition), block comment normally exclude comments
23  * that begin with "/&#42;#42;", which are instead classified as doc
24  * comments ({@link Javadoc}).
25  * </p>
26  * <p>
27  * Note that this node type is a comment placeholder, and is
28  * only useful for recording the source range where a comment
29  * was found in a source string. It is not useful for creating
30  * comments.
31  * </p>
32  * 
33  * @since 3.0
34  * @noinstantiate This class is not intended to be instantiated by clients.
35  */
36 public final class BlockComment extends Comment {
37         
38         /**
39          * A list of property descriptors (element type: 
40          * {@link StructuralPropertyDescriptor}),
41          * or null if uninitialized.
42          */
43         private static final List PROPERTY_DESCRIPTORS;
44         
45         static {
46                 List properyList = new ArrayList(1);
47                 createPropertyList(BlockComment.class, properyList);
48                 PROPERTY_DESCRIPTORS = reapPropertyList(properyList);
49         }
50
51         /**
52          * Returns a list of structural property descriptors for this node type.
53          * Clients must not modify the result.
54          * 
55          * @param apiLevel the API level; one of the
56          * <code>AST.JLS*</code> constants
57
58          * @return a list of property descriptors (element type: 
59          * {@link StructuralPropertyDescriptor})
60          * @since 3.0
61          */
62         public static List propertyDescriptors(int apiLevel) {
63                 return PROPERTY_DESCRIPTORS;
64         }
65                         
66         /**
67          * Creates a new block comment node owned by the given AST.
68          * <p>
69          * N.B. This constructor is package-private.
70          * </p>
71          * 
72          * @param ast the AST that is to own this node
73          */
74         BlockComment(AST ast) {
75                 super(ast);
76         }
77
78         /* (omit javadoc for this method)
79          * Method declared on ASTNode.
80          */
81         final List internalStructuralPropertiesForType(int apiLevel) {
82                 return propertyDescriptors(apiLevel);
83         }
84         
85         /* (omit javadoc for this method)
86          * Method declared on ASTNode.
87          */
88         final int getNodeType0() {
89                 return BLOCK_COMMENT;
90         }
91
92         /* (omit javadoc for this method)
93          * Method declared on ASTNode.
94          */
95         ASTNode clone0(AST target) {
96                 BlockComment result = new BlockComment(target);
97                 result.setSourceRange(this.getStartPosition(), this.getLength());
98                 return result;
99         }
100
101         /* (omit javadoc for this method)
102          * Method declared on ASTNode.
103          */
104         final boolean subtreeMatch0(ASTMatcher matcher, Object other) {
105                 // dispatch to correct overloaded match method
106                 return matcher.match(this, other);
107         }
108
109         /* (omit javadoc for this method)
110          * Method declared on ASTNode.
111          */
112         void accept0(ASTVisitor visitor) {
113                 visitor.visit(this);
114                 visitor.endVisit(this);
115         }
116         
117         /* (omit javadoc for this method)
118          * Method declared on ASTNode.
119          */
120         int memSize() {
121                 return super.memSize();
122         }
123         
124         /* (omit javadoc for this method)
125          * Method declared on ASTNode.
126          */
127         int treeSize() {
128                 return memSize();
129         }
130 }