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 28 public 29 final class CONSTANT_String_info extends CONSTANT_literal_info 30 { 31 33 public static final byte TAG = 8; 34 35 public int m_string_index; 36 37 38 public CONSTANT_String_info (final int string_index) 39 { 40 m_string_index = string_index; 41 } 42 43 44 public final byte tag () 45 { 46 return TAG; 47 } 48 49 51 public Object accept (final ICONSTANTVisitor visitor, final Object ctx) 52 { 53 return visitor.visit (this, ctx); 54 } 55 56 public String toString () 57 { 58 return "CONSTANT_String: [string_index = " + m_string_index + ']'; 59 } 60 61 63 65 public void writeInClassFormat (final UDataOutputStream out) throws IOException 66 { 67 super.writeInClassFormat (out); 68 69 out.writeU2 (m_string_index); 70 } 71 72 74 75 protected CONSTANT_String_info (final UDataInputStream bytes) throws IOException 76 { 77 m_string_index = bytes.readU2 (); 78 } 79 80 82 84 } | Popular Tags |