1 18 package org.apache.tools.ant.taskdefs.optional.depend.constantpool; 19 20 import java.io.DataInputStream ; 21 import java.io.IOException ; 22 23 28 public class StringCPInfo extends ConstantCPInfo { 29 30 31 public StringCPInfo() { 32 super(CONSTANT_STRING, 1); 33 } 34 35 43 public void read(DataInputStream cpStream) throws IOException { 44 index = cpStream.readUnsignedShort(); 45 46 setValue("unresolved"); 47 } 48 49 54 public String toString() { 55 return "String Constant Pool Entry for " 56 + getValue() + "[" + index + "]"; 57 } 58 59 66 public void resolve(ConstantPool constantPool) { 67 setValue(((Utf8CPInfo) constantPool.getEntry(index)).getValue()); 68 super.resolve(constantPool); 69 } 70 71 72 private int index; 73 } 74 75 | Popular Tags |