1 28 29 package com.caucho.bytecode; 30 31 import com.caucho.log.Log; 32 33 import java.io.IOException ; 34 import java.util.logging.Logger ; 35 36 39 public class DoubleConstant extends ConstantPoolEntry { 40 static private final Logger log = Log.open(DoubleConstant.class); 41 42 private double _value; 43 44 47 DoubleConstant(ConstantPool pool, int index, double value) 48 { 49 super(pool, index); 50 51 _value = value; 52 } 53 54 57 public double getValue() 58 { 59 return _value; 60 } 61 62 65 void write(ByteCodeWriter out) 66 throws IOException 67 { 68 out.write(ConstantPool.CP_DOUBLE); 69 out.writeDouble(_value); 70 } 71 72 75 public int export(ConstantPool target) 76 { 77 return target.addDouble(_value).getIndex(); 78 } 79 80 public String toString() 81 { 82 return "DoubleConstant[" + _value + "]"; 83 } 84 } 85 | Popular Tags |