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 {
 
  18         public TypeBinding type;
 
  22         public Constant constant;
 
  24         public int id; // for flow-analysis (position in flowInfo bit vector)
 
  26         public boolean isConstantValue() {
 
  27                 return constant != Constant.NotAConstant;
 
  30         public final boolean isBlankFinal() {
 
  31                 return (modifiers & AccBlankFinal) != 0;
 
  35          * Answer true if the receiver is final and cannot be changed
 
  38         public final boolean isFinal() {
 
  39                 return (modifiers & AccFinal) != 0;
 
  42         public char[] readableName() {
 
  46         public String toString() {
 
  47                 String s = (type != null) ? type.debugName() : "UNDEFINED TYPE"; //$NON-NLS-1$
 
  48                 s += " "; //$NON-NLS-1$
 
  49                 s += (name != null) ? new String(name) : "UNNAMED FIELD"; //$NON-NLS-1$