removed Makefile; lifted repo/org.ibex.tool/src/ to src/
[org.ibex.tool.git] / src / org / eclipse / jdt / internal / compiler / lookup / VariableBinding.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2004 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
7  * 
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  *******************************************************************************/
11 package org.eclipse.jdt.internal.compiler.lookup;
12
13 import org.eclipse.jdt.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
22 public boolean isConstantValue() {
23         return constant != Constant.NotAConstant;
24 }
25
26 public final boolean isBlankFinal(){
27         return (modifiers & AccBlankFinal) != 0;
28 }
29 /* Answer true if the receiver is final and cannot be changed
30 */
31
32 public final boolean isFinal() {
33         return (modifiers & AccFinal) != 0;
34 }
35 public char[] readableName() {
36         return name;
37 }
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$
42         return s;
43 }
44 }