1 /*******************************************************************************
2 * Copyright (c) 2000, 2003 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Common Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/cpl-v10.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)
22 public boolean isConstantValue() {
23 return constant != Constant.NotAConstant;
26 public final boolean isBlankFinal(){
27 return (modifiers & AccBlankFinal) != 0;
29 /* Answer true if the receiver is final and cannot be changed
32 public final boolean isFinal() {
33 return (modifiers & AccFinal) != 0;
35 public char[] readableName() {
38 public String toString() {
39 String s = (type != null) ? type.debugName() : "UNDEFINED TYPE"; //$NON-NLS-1$
40 s += " "; //$NON-NLS-1$
41 s += (name != null) ? new String(name) : "UNNAMED FIELD"; //$NON-NLS-1$