Artifact ed7b56227ed423ec1f2f7ff96e20eb2de9fb21cca591191fbc9efe058bad94da:
- Executable file
r37/lisp/csl/jlisp/Field_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: 1298) [annotate] [blame] [check-ins using] [more...]
// 16/02/02 actually made to do something // almost exactly identical to Method_info so may consider making a superclass // and then subclassing Method_info and Field_info from it? import java.io.*; public class Field_info { static short fields_count; short access_flags; short name_index; short descriptor_index; short attributes_count; Attribute_info attributes[]; // should be [attributes_count] byte[] fieldName; byte[] descriptor; void setAccess(short access) { access_flags = access; } void setName(String s) throws UnsupportedEncodingException { fieldName = s.getBytes("UTF-8"); } void setDescriptor(String s) throws UnsupportedEncodingException { descriptor = s.getBytes("UTF-8"); } byte[] dumpBytes() { byte[][] Bytes = new byte[5][0]; Bytes[0] = ByteArray.shortToByteArray(access_flags); Bytes[1] = ByteArray.shortToByteArray(name_index); Bytes[2] = ByteArray.shortToByteArray(descriptor_index); Bytes[3] = ByteArray.shortToByteArray(attributes_count); Bytes[4] = ByteArray.attToByteArray(attributes); return ByteArray.flatBytes(Bytes); } } // end of Field_info.java