| 1 9 package com.vladium.jcd.cls.constant; 10 11 import java.io.IOException ; 12 13 import com.vladium.jcd.lib.UDataInputStream; 14 import com.vladium.jcd.lib.UDataOutputStream; 15 16 27 public 28 final class CONSTANT_Integer_info extends CONSTANT_literal_info 29 { 30 32 public static final byte TAG = 3; 33 34 public int m_value; 35 36 37 public CONSTANT_Integer_info (final int value) 38 { 39 m_value = value; 40 } 41 42 public final byte tag () 43 { 44 return TAG; 45 } 46 47 49 public Object accept (final ICONSTANTVisitor visitor, final Object ctx) 50 { 51 return visitor.visit (this, ctx); 52 } 53 54 public String toString () 55 { 56 return Integer.toString (m_value); 57 } 58 59 61 63 public void writeInClassFormat (final UDataOutputStream out) throws IOException  64 { 65 super.writeInClassFormat (out); 66 67 out.writeInt (m_value); 68 } 69 70 72 73 protected CONSTANT_Integer_info (final UDataInputStream bytes) throws IOException  74 { 75 m_value = bytes.readInt (); 76 } 77 78 80 82 } | Popular Tags |