01: /*
02: This library is free software; you can redistribute it and/or
03: modify it under the terms of the GNU General Public
04: License as published by the Free Software Foundation; either
05: version 2 of the license, or (at your option) any later version.
06: */
07:
08: package org.gjt.jclasslib.structures.constants;
09:
10: import org.gjt.jclasslib.structures.InvalidByteCodeException;
11:
12: import java.io.*;
13:
14: /**
15: Describes a <tt>CONSTANT_Fieldref_info</tt> constant pool data structure.
16:
17: @author <a href="mailto:jclasslib@ej-technologies.com">Ingo Kegel</a>
18: @version $Revision: 1.3 $ $Date: 2003/07/08 14:04:29 $
19: */
20: public class ConstantFieldrefInfo extends ConstantReference {
21:
22: public byte getTag() {
23: return CONSTANT_FIELDREF;
24: }
25:
26: public String getTagVerbose() {
27: return CONSTANT_FIELDREF_VERBOSE;
28: }
29:
30: public void read(DataInput in) throws InvalidByteCodeException,
31: IOException {
32:
33: super .read(in);
34: if (debug)
35: debug("read ");
36: }
37:
38: public void write(DataOutput out) throws InvalidByteCodeException,
39: IOException {
40:
41: out.writeByte(CONSTANT_FIELDREF);
42: super .write(out);
43: if (debug)
44: debug("wrote ");
45: }
46:
47: protected void debug(String message) {
48: super .debug(message + getTagVerbose() + " with class_index "
49: + classIndex + " and name_and_type_index "
50: + nameAndTypeIndex);
51: }
52:
53: }
|