1 7 8 package jas; 9 10 import java.io.*; 11 import java.util.*; 12 13 public class FloatElemValPair extends ElemValPair{ 14 15 FloatCP val; 16 17 void resolve(ClassEnv e){ 18 super.resolve(e); 19 e.addCPItem(val); 20 } 21 22 26 public FloatElemValPair(String name, char kind, float val) { super(name, kind); 28 this.val = new FloatCP(val); 29 } 30 31 int size(){ 32 return super.size() + 2; 33 } 34 35 36 void write(ClassEnv e, DataOutputStream out) 37 throws IOException, jasError 38 { 39 super.write(e, out); 40 out.writeShort(e.getCPIndex(val)); 41 } 42 } 43 | Popular Tags |