1 7 8 package org.gjt.jclasslib.structures.constants; 9 10 import org.gjt.jclasslib.structures.InvalidByteCodeException; 11 12 import java.io.*; 13 14 20 public class ConstantIntegerInfo extends ConstantNumeric { 21 22 public byte getTag() { 23 return CONSTANT_INTEGER; 24 } 25 26 public String getTagVerbose() { 27 return CONSTANT_INTEGER_VERBOSE; 28 } 29 30 public String getVerbose() throws InvalidByteCodeException { 31 return String.valueOf(getInt()); 32 } 33 34 38 public int getInt() { 39 return bytes; 40 } 41 42 46 public void setInt(int number) { 47 bytes = number; 48 } 49 50 public void read(DataInput in) 51 throws InvalidByteCodeException, IOException { 52 53 super.read(in); 54 if (debug) debug("read "); 55 } 56 57 public void write(DataOutput out) 58 throws InvalidByteCodeException, IOException { 59 60 out.writeByte(CONSTANT_INTEGER); 61 super.write(out); 62 if (debug) debug("wrote "); 63 } 64 65 protected void debug(String message) { 66 super.debug(message + getTagVerbose() + " with bytes " + bytes); 67 } 68 69 } 70 | Popular Tags |