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
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11 package org.eclipse.jdt.internal.compiler.impl;
13 public class CharConstant extends Constant {
17 public CharConstant(char value) {
20 public byte byteValue() {
23 public char charValue() {
26 public double doubleValue() {
27 return value; // implicit cast to return type
29 public float floatValue() {
30 return value; // implicit cast to return type
32 public int intValue() {
33 return value; // implicit cast to return type
35 public long longValue() {
36 return value; // implicit cast to return type
38 public short shortValue() {
41 public String stringValue() {
44 String s = new Character(value).toString() ;
45 if (s == null) return "null"; //$NON-NLS-1$
48 public String toString(){
50 return "(char)" + value; //$NON-NLS-1$