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.lookup;
13 import net.sourceforge.phpdt.internal.compiler.impl.Constant;
15 public abstract class VariableBinding extends Binding {
17 public TypeBinding type;
19 public Constant constant;
20 public int id; // for flow-analysis (position in flowInfo bit vector)
21 public boolean isConstantValue() {
22 return constant != Constant.NotAConstant;
24 /* Answer true if the receiver is final and cannot be changed
27 public final boolean isFinal() {
28 return (modifiers & AccFinal) != 0;
30 public char[] readableName() {
33 public String toString() {
34 String s = (type != null) ? type.debugName() : "UNDEFINED TYPE"; //$NON-NLS-1$
35 s += " "; //$NON-NLS-1$
36 s += (name != null) ? new String(name) : "UNNAMED FIELD"; //$NON-NLS-1$