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 LongConstant extends ConstantPoolEntry { 40 static private final Logger log = Log.open(LongConstant.class); 41 42 private long _value; 43 44 47 LongConstant(ConstantPool pool, int index, long value) 48 { 49 super(pool, index); 50 51 _value = value; 52 } 53 54 57 public long getValue() 58 { 59 return _value; 60 } 61 62 65 void write(ByteCodeWriter out) 66 throws IOException 67 { 68 out.write(ConstantPool.CP_LONG); 69 out.writeLong(_value); 70 } 71 72 75 public int export(ConstantPool target) 76 { 77 return target.addLong(_value).getIndex(); 78 } 79 80 public String toString() 81 { 82 return "LongConstant[" + _value + "]"; 83 } 84 } 85 | Popular Tags |