1 7 8 package jas; 9 10 import java.io.*; 11 12 13 public class ClassCP extends CP implements RuntimeConstants 14 { 15 AsciiCP name; 16 17 20 public ClassCP(String name) 21 { 22 uniq = ("CLASS: #$%^#$" + name).intern(); 23 this.name = new AsciiCP(name); 24 } 25 26 void resolve(ClassEnv e) 27 { e.addCPItem(name); } 28 29 void write(ClassEnv e, DataOutputStream out) 30 throws IOException, jasError 31 { 32 out.writeByte(CONSTANT_CLASS); 33 out.writeShort(e.getCPIndex(name)); 34 } 35 } 36 | Popular Tags |