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