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
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
12 package net.sourceforge.phpdt.core.dom;
14 import java.util.ArrayList;
15 import java.util.List;
18 * Null statement AST node type.
26 * @noinstantiate This class is not intended to be instantiated by clients.
28 public class EmptyStatement extends Statement {
31 * A list of property descriptors (element type:
32 * {@link StructuralPropertyDescriptor}),
33 * or null if uninitialized.
35 private static final List PROPERTY_DESCRIPTORS;
38 List properyList = new ArrayList(1);
39 createPropertyList(EmptyStatement.class, properyList);
40 PROPERTY_DESCRIPTORS = reapPropertyList(properyList);
44 * Returns a list of structural property descriptors for this node type.
45 * Clients must not modify the result.
47 * @param apiLevel the API level; one of the
48 * <code>AST.JLS*</code> constants
50 * @return a list of property descriptors (element type:
51 * {@link StructuralPropertyDescriptor})
54 public static List propertyDescriptors(int apiLevel) {
55 return PROPERTY_DESCRIPTORS;
59 * Creates a new unparented null statement node owned by the given AST.
61 * N.B. This constructor is package-private.
64 * @param ast the AST that is to own this node
66 EmptyStatement(AST ast) {
70 /* (omit javadoc for this method)
71 * Method declared on ASTNode.
73 final List internalStructuralPropertiesForType(int apiLevel) {
74 return propertyDescriptors(apiLevel);
77 /* (omit javadoc for this method)
78 * Method declared on ASTNode.
80 final int getNodeType0() {
81 return EMPTY_STATEMENT;
84 /* (omit javadoc for this method)
85 * Method declared on ASTNode.
87 ASTNode clone0(AST target) {
88 EmptyStatement result = new EmptyStatement(target);
89 result.setSourceRange(this.getStartPosition(), this.getLength());
90 result.copyLeadingComment(this);
94 /* (omit javadoc for this method)
95 * Method declared on ASTNode.
97 final boolean subtreeMatch0(ASTMatcher matcher, Object other) {
98 // dispatch to correct overloaded match method
99 return matcher.match(this, other);
102 /* (omit javadoc for this method)
103 * Method declared on ASTNode.
105 void accept0(ASTVisitor visitor) {
107 visitor.endVisit(this);
110 /* (omit javadoc for this method)
111 * Method declared on ASTNode.