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.impl;
13 public class StringConstant extends Constant {
16 public StringConstant(String value) {
19 public boolean compileTimeEqual(StringConstant right){
20 //String are intermed in the compiler==>thus if two string constant
21 //get to be compared, it is an equal on the vale which is done
22 if (this.value == null) {
23 return right.value == null;
25 return this.value.equals(right.value);
27 public String stringValue() {
30 //the next line do not go into the toString() send....!
34 String s = value.toString() ;
42 public String toString(){
44 return "(String)\"" + value +"\""; } //$NON-NLS-2$ //$NON-NLS-1$