1 7 8 package jas; 9 10 import java.io.*; 11 import java.util.*; 12 13 public class ClassElemValPair extends ElemValPair { 14 15 AsciiCP cval; 16 17 void resolve(ClassEnv e){ 18 super.resolve(e); 19 e.addCPItem(cval); 20 } 21 22 26 public ClassElemValPair(String name, char kind, String cval) { super(name, kind); 28 this.cval = new AsciiCP(cval); 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(cval)); 41 } 42 } 43 | Popular Tags |