|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.rice.cs.cunit.classFile.MethodInfo
public final class MethodInfo
Represents a method in a class file.
Field Summary | |
---|---|
private short |
_accessFlags
Method access flags. |
private java.util.ArrayList<AAttributeInfo> |
_attributes
Attributes. |
private AUTFPoolInfo |
_descriptor
Type descriptor information. |
private AUTFPoolInfo |
_name
Name information. |
Constructor Summary | |
---|---|
MethodInfo(java.io.DataInputStream di,
ConstantPool pool)
Constructor |
|
MethodInfo(short accessFlags,
AUTFPoolInfo name,
AUTFPoolInfo signature,
AAttributeInfo[] attributes)
Constructor |
Method Summary | |
---|---|
java.util.ArrayList<LineNumberTableAttributeInfo.LineNumberRecord> |
checkLineNumbers()
Check the line number table for errors and return a list of erroneous LineNumberRecords. |
boolean |
equals(java.lang.Object o)
Indicates whether some other object is "equal to" this one. |
short |
getAccessFlags()
Accessor for access flags. |
AAttributeInfo |
getAttribute(java.lang.String name)
Return the attribute with the specified name. |
java.util.ArrayList<AAttributeInfo> |
getAttributes()
Accessor for attributes. |
CodeAttributeInfo |
getCodeAttributeInfo()
Return this method's code attribute info. |
AUTFPoolInfo |
getDescriptor()
Accessor for descriptor. |
AUTFPoolInfo |
getName()
Accessor for field name. |
java.lang.String |
getSignature()
Return the method's signature, i.e. |
int |
hashCode()
Returns a hash code value for the object. |
void |
setAccessFlags(short accessFlags)
Mutator for access flags. |
void |
setDescriptor(AUTFPoolInfo descriptor)
Mutator for descriptor. |
void |
setName(AUTFPoolInfo name)
Mutator for field name. |
java.lang.String |
toString()
Return a human-readable version of this method. |
java.lang.String |
toString(ConstantPool pool)
Return a human-readable version of this method. |
java.lang.String |
toString(ConstantPool pool,
boolean lineNumbers,
boolean PCs)
Return a human-readable version of this method. |
void |
write(java.io.DataOutputStream dos,
ConstantPool pool)
Write this method into the stream. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private short _accessFlags
private AUTFPoolInfo _name
private AUTFPoolInfo _descriptor
private java.util.ArrayList<AAttributeInfo> _attributes
Constructor Detail |
---|
public MethodInfo(short accessFlags, AUTFPoolInfo name, AUTFPoolInfo signature, AAttributeInfo[] attributes)
accessFlags
- method access flagsname
- method namesignature
- method descriptorattributes
- array of attributespublic MethodInfo(java.io.DataInputStream di, ConstantPool pool) throws java.io.IOException, java.lang.ClassFormatError
di
- input streampool
- constant pool
java.io.IOException
java.lang.ClassFormatError
Method Detail |
---|
public void write(java.io.DataOutputStream dos, ConstantPool pool) throws java.io.IOException
dos
- output streampool
- constant pool
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(ConstantPool pool)
pool
- constant pool
public java.lang.String toString(ConstantPool pool, boolean lineNumbers, boolean PCs)
pool
- constant poollineNumbers
- print line numbersPCs
- print PC values
public java.util.ArrayList<LineNumberTableAttributeInfo.LineNumberRecord> checkLineNumbers()
public short getAccessFlags()
public void setAccessFlags(short accessFlags)
accessFlags
- new access flagspublic AUTFPoolInfo getName()
public void setName(AUTFPoolInfo name)
name
- new field namepublic AUTFPoolInfo getDescriptor()
public void setDescriptor(AUTFPoolInfo descriptor)
descriptor
- new descriptorpublic java.util.ArrayList<AAttributeInfo> getAttributes()
public AAttributeInfo getAttribute(java.lang.String name)
name
- attribute name
public CodeAttributeInfo getCodeAttributeInfo()
public java.lang.String getSignature()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- the reference object with which to compare.
true
if this object is the same as the obj argument; false
otherwise.public int hashCode()
hashCode
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |