net.sf.rej.java
Class Method

java.lang.Object
  extended by net.sf.rej.java.Method
All Implemented Interfaces:
DescriptorEnabled

public class Method
extends java.lang.Object
implements DescriptorEnabled

A method of a class.

Author:
Sami Koivu

Nested Class Summary
static class Method.OffsetTag
           
 
Method Summary
 int getAccessFlags()
           
 java.lang.String getAccessString()
           
 Attributes getAttributes()
           
 byte[] getData()
           
 Descriptor getDescriptor()
           
 int getDescriptorIndex()
           
 java.util.List<ExceptionDescriptor> getExceptions()
           
 java.lang.String getName()
           
 int getNameIndex()
           
 java.util.Map<java.lang.Object,Range> getOffsetMap()
          Returns a map of offsets of each significant element of this method.
 java.lang.String getSignatureLine()
           
 java.lang.String getSignatureLine(java.lang.String className)
           
 boolean isDeprecated()
           
 void setAccessFlags(AccessFlags accessFlags)
           
 void setDescriptorIndex(int descIndex)
           
 void setNameIndex(int nameIndex)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getAccessFlags

public int getAccessFlags()

getNameIndex

public int getNameIndex()

setNameIndex

public void setNameIndex(int nameIndex)

getDescriptorIndex

public int getDescriptorIndex()
Specified by:
getDescriptorIndex in interface DescriptorEnabled

setDescriptorIndex

public void setDescriptorIndex(int descIndex)
Specified by:
setDescriptorIndex in interface DescriptorEnabled

getAttributes

public Attributes getAttributes()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getData

public byte[] getData()

getOffsetMap

public java.util.Map<java.lang.Object,Range> getOffsetMap()
Returns a map of offsets of each significant element of this method. The offsets returned by this method are only valid until this object is modified. The keys in the map are of type OffsetTag, Attribute.

Returns:
a map of element offsets in class file data.

getName

public java.lang.String getName()

getAccessString

public java.lang.String getAccessString()

getDescriptor

public Descriptor getDescriptor()

getSignatureLine

public java.lang.String getSignatureLine()

getSignatureLine

public java.lang.String getSignatureLine(java.lang.String className)

setAccessFlags

public void setAccessFlags(AccessFlags accessFlags)

getExceptions

public java.util.List<ExceptionDescriptor> getExceptions()

isDeprecated

public boolean isDeprecated()