Artifact c2e2580c9124565946cce88b89bda6ef8758e882012284fce6521d077754b6d5:
- Executable file
r37/lisp/csl/jlisp/CONSTANT_Fieldref_info.java
— part of check-in
[f2fda60abd]
at
2011-09-02 18:13:33
on branch master
— Some historical releases purely for archival purposes
git-svn-id: https://svn.code.sf.net/p/reduce-algebra/code/trunk/historical@1375 2bfe0521-f11c-4a00-b80e-6202646ff360 (user: arthurcnorman@users.sourceforge.net, size: 1447) [annotate] [blame] [check-ins using] [more...]
//created 20/02/02 since it wasn't needed for Trivial.java // exactly same as CONSTANT_Methodref_info with "Method" replaced by "Field" import java.io.*; public class CONSTANT_Fieldref_info extends Cp_info { public static void main(String[] args) throws IOException { short cidx = (short)0x4; short ntidx = (short)0xf; CONSTANT_Fieldref_info cm = new CONSTANT_Fieldref_info(cidx, ntidx); cm.printBytes(cm.dumpBytes()); Jlisp.println("\n"); short cidx2 = (short)0x3; short ntidx2 = (short)0x10; CONSTANT_Fieldref_info cm2 = new CONSTANT_Fieldref_info(cidx2, ntidx2); cm2.printBytes(cm2.dumpBytes()); Jlisp.println("\n"); } short class_index; short name_and_type_index; //constructor CONSTANT_Fieldref_info(short classIndex, short ntIndex) throws IOException { tag = CONSTANT_Fieldref; class_index = classIndex; name_and_type_index = ntIndex; //below is the toInfo() method of Code_Attribute.java byte[][] infoTemp = new byte[2][0]; infoTemp[0] = shortToByteArray(class_index); infoTemp[1] = shortToByteArray(name_and_type_index); info = new byte[4]; info = flatBytes(infoTemp); } } // end of CONSTANT_Fieldref_info.java