1 /*******************************************************************************
2 * Copyright (c) 2000, 2001, 2002 International Business Machines Corp. and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Common Public License v0.5
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/cpl-v05.html
9 * IBM Corporation - initial API and implementation
10 ******************************************************************************/
11 package net.sourceforge.phpdt.internal.compiler.ast;
13 public abstract class AbstractVariableDeclaration extends Statement {
16 public TypeReference type;
17 public Expression initialization;
20 public int declarationEnd;
21 public int declarationSourceStart;
22 public int declarationSourceEnd;
23 public int modifiersSourceStart;
24 public AbstractVariableDeclaration() {
26 public abstract String name();
28 public String toString(int tab) {
30 String s = tabString(tab);
31 if (modifiers != AccDefault) {
32 s += modifiersString(modifiers);
34 s += type.toString(0) + " " + new String(name()); //$NON-NLS-1$
35 if (initialization != null)
36 s += " = " + initialization.toStringExpression(tab); //$NON-NLS-1$