1 23 24 25 package com.sun.jdo.api.persistence.enhancer.classfile; 26 27 import java.io.*; 28 29 32 33 public class ConstFloat extends ConstValue { 34 35 public static final int MyTag = CONSTANTFloat; 36 37 38 private float floatValue; 39 40 41 42 45 public int tag () { return MyTag; } 46 47 50 public float value() { 51 return floatValue; 52 } 53 54 57 public String descriptor() { 58 return "F"; } 60 61 64 public String toString () { 65 return "CONSTANTFloat(" + indexAsString() + "): " + "floatValue(" + Float.toString(floatValue) + ")"; } 68 69 70 71 ConstFloat (float f) { 72 floatValue = f; 73 } 74 75 void formatData (DataOutputStream b) throws IOException { 76 b.writeFloat(floatValue); 77 } 78 79 static ConstFloat read (DataInputStream input) throws IOException { 80 return new ConstFloat (input.readFloat()); 81 } 82 83 void resolve (ConstantPool p) { } 84 85 } 86 87 88 | Popular Tags |