1 11 package org.eclipse.jdi.internal; 12 13 14 import java.io.DataInputStream ; 15 import java.io.DataOutputStream ; 16 import java.io.IOException ; 17 18 import org.eclipse.jdi.internal.jdwp.JdwpID; 19 20 import com.sun.jdi.DoubleValue; 21 import com.sun.jdi.Type; 22 23 29 public class DoubleValueImpl extends PrimitiveValueImpl implements DoubleValue { 30 31 public static final byte tag = JdwpID.DOUBLE_TAG; 32 33 36 public DoubleValueImpl(VirtualMachineImpl vmImpl, Double value) { 37 super("DoubleValue", vmImpl, value); } 39 40 43 public byte getTag() { 44 return tag; 45 } 46 47 50 public Type type() { 51 return virtualMachineImpl().getDoubleType(); 52 } 53 54 57 public double value() { 58 return doubleValue(); 59 } 60 61 64 public static DoubleValueImpl read(MirrorImpl target, DataInputStream in) throws IOException { 65 VirtualMachineImpl vmImpl = target.virtualMachineImpl(); 66 double value = target.readDouble("doubleValue", in); return new DoubleValueImpl(vmImpl, new Double (value)); 68 } 69 70 73 public void write(MirrorImpl target, DataOutputStream out) throws IOException { 74 target.writeDouble(((Double )fValue).doubleValue(), "doubleValue", out); } 76 } 77 | Popular Tags |