removed unused private methods.
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / core / dom / EmptyStatement.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 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
12 package net.sourceforge.phpdt.core.dom;
13
14 import java.util.ArrayList;
15 import java.util.List;
16
17 /**
18  * Null statement AST node type.
19  *
20  * <pre>
21  * EmptyStatement:
22  *    <b>;</b>
23  * </pre>
24  * 
25  * @since 2.0
26  * @noinstantiate This class is not intended to be instantiated by clients.
27  */
28 public class EmptyStatement extends Statement {
29
30         /**
31          * A list of property descriptors (element type: 
32          * {@link StructuralPropertyDescriptor}),
33          * or null if uninitialized.
34          */
35         private static final List PROPERTY_DESCRIPTORS;
36         
37         static {
38                 List properyList = new ArrayList(1);
39                 createPropertyList(EmptyStatement.class, properyList);
40                 PROPERTY_DESCRIPTORS = reapPropertyList(properyList);
41         }
42
43         /**
44          * Returns a list of structural property descriptors for this node type.
45          * Clients must not modify the result.
46          * 
47          * @param apiLevel the API level; one of the
48          * <code>AST.JLS*</code> constants
49
50          * @return a list of property descriptors (element type: 
51          * {@link StructuralPropertyDescriptor})
52          * @since 3.0
53          */
54         public static List propertyDescriptors(int apiLevel) {
55                 return PROPERTY_DESCRIPTORS;
56         }
57                         
58         /**
59          * Creates a new unparented null statement node owned by the given AST.
60          * <p>
61          * N.B. This constructor is package-private.
62          * </p>
63          * 
64          * @param ast the AST that is to own this node
65          */
66         EmptyStatement(AST ast) {
67                 super(ast);
68         }
69         
70         /* (omit javadoc for this method)
71          * Method declared on ASTNode.
72          */
73         final List internalStructuralPropertiesForType(int apiLevel) {
74                 return propertyDescriptors(apiLevel);
75         }
76         
77         /* (omit javadoc for this method)
78          * Method declared on ASTNode.
79          */
80         final int getNodeType0() {
81                 return EMPTY_STATEMENT;
82         }
83
84         /* (omit javadoc for this method)
85          * Method declared on ASTNode.
86          */
87         ASTNode clone0(AST target) {
88                 EmptyStatement result = new EmptyStatement(target);
89                 result.setSourceRange(this.getStartPosition(), this.getLength());
90                 result.copyLeadingComment(this);
91                 return result;
92         }
93
94         /* (omit javadoc for this method)
95          * Method declared on ASTNode.
96          */
97         final boolean subtreeMatch0(ASTMatcher matcher, Object other) {
98                 // dispatch to correct overloaded match method
99                 return matcher.match(this, other);
100         }
101
102         /* (omit javadoc for this method)
103          * Method declared on ASTNode.
104          */
105         void accept0(ASTVisitor visitor) {
106                 visitor.visit(this);
107                 visitor.endVisit(this);
108         }
109         
110         /* (omit javadoc for this method)
111          * Method declared on ASTNode.
112          */
113         int treeSize() {
114                 return memSize();
115         }
116 }
117