Java API by
Zvi Har’El

cf
Class MemberInfo

java.lang.Object
  extended by cf.MemberInfo

 class MemberInfo
extends Object

An instance of the class MemberInfo is an in-core representaion of a class member, that is, of a method or a field.

Version:
$Id: MemberInfo.java,v 1.44 2003/08/16 08:04:52 rl Exp $
Author:
Zvi Har’El
See Also:
Class source code

Field Summary
(package private)  short access
          Member access modifiers.
(package private)  Vector attributes
          Attributes of this member.
(package private)  CodeAttribute ca
          The “Code” attribute of this member.
(package private)  short descriptorIndex
          The descriptor of this member.
(package private)  short nameIndex
          The name of this member.
 
Constructor Summary
MemberInfo(DataInputStream in, ClassFile cf)
          Constructs an MemberInfo object by reading the input stream.
MemberInfo(int acc, String name, String desc, ClassFile cf)
          Constructs a MemberInfo object for a new method or field.
 
Method Summary
(package private)  void strip()
          Strip attributes.
(package private)  void write(DataOutputStream out)
          Writes the MemberInfo object on an output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

access

short access
Member access modifiers.


nameIndex

short nameIndex
The name of this member. An index to a UTF8 constant.


descriptorIndex

short descriptorIndex
The descriptor of this member. An index to a UTF8 constant.


attributes

final Vector attributes
Attributes of this member. Except “Code”, the attributes possible at this level are “ConstantValue” (for a field) and “Exceptions” (for a method). Each entry is a byte array.


ca

CodeAttribute ca
The “Code” attribute of this member. Null if this is a field or an abstract method.

Constructor Detail

MemberInfo

MemberInfo(DataInputStream in,
           ClassFile cf)
     throws IOException
Constructs an MemberInfo object by reading the input stream.

Parameters:
in - the input stream
cf - the ClassFile object which contains the constant pool for this class
Throws:
IOException - if an input error occurs

MemberInfo

MemberInfo(int acc,
           String name,
           String desc,
           ClassFile cf)
Constructs a MemberInfo object for a new method or field. If the member is a non-abstract method, a new CodeAttribute object is constructed for it.

Parameters:
acc - the member access modifiers
name - the member name
desc - the member descriptor
cf - the ClassFile object which contains the constant pool for this member
Method Detail

write

final void write(DataOutputStream out)
          throws IOException
Writes the MemberInfo object on an output stream.

Parameters:
out - the output stream
Throws:
IOException - if output error occurs

strip

final void strip()
Strip attributes.


Java API by
Zvi Har’El

Copyright © Zvi Har’El
$Date: 2007/10/15 13:50:30$