deleted: export="true"
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / lookup / VariableBinding.java
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
7  * 
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  ******************************************************************************/
11 package net.sourceforge.phpdt.internal.compiler.lookup;
12
13 import net.sourceforge.phpdt.internal.compiler.impl.Constant;
14
15 public abstract class VariableBinding extends Binding {
16         public int modifiers;
17         public TypeBinding type;
18         public char[] name;
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;
23 }
24 /* Answer true if the receiver is final and cannot be changed
25 */
26
27 public final boolean isFinal() {
28         return (modifiers & AccFinal) != 0;
29 }
30 public char[] readableName() {
31         return name;
32 }
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$
37         return s;
38 }
39 }