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