org.apache.bcel.classfile
public final class Method extends FieldOrMethod
Modifier and Type | Field and Description |
---|---|
private static BCELComparator |
_cmp |
attributes, attributes_count, constant_pool, name_index, signature_index
access_flags
Constructor and Description |
---|
Method()
Empty constructor, all attributes have to be defined via `setXXX'
methods.
|
Method(java.io.DataInputStream file,
ConstantPool constant_pool)
Construct object from file stream.
|
Method(int access_flags,
int name_index,
int signature_index,
Attribute[] attributes,
ConstantPool constant_pool) |
Method(Method c)
Initialize from another object.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(Visitor v)
Called by objects that are traversing the nodes of the tree implicitely
defined by the contents of a Java class.
|
Method |
copy(ConstantPool _constant_pool) |
boolean |
equals(java.lang.Object obj)
Return value as defined by given BCELComparator strategy.
|
Type[] |
getArgumentTypes() |
Code |
getCode() |
static BCELComparator |
getComparator() |
ExceptionTable |
getExceptionTable() |
LineNumberTable |
getLineNumberTable() |
LocalVariableTable |
getLocalVariableTable() |
Type |
getReturnType() |
int |
hashCode()
Return value as defined by given BCELComparator strategy.
|
static void |
setComparator(BCELComparator comparator) |
java.lang.String |
toString()
Return string representation close to declaration format,
`public static void main(String[] args) throws IOException', e.g.
|
copy_, dump, getAttributes, getConstantPool, getName, getNameIndex, getSignature, getSignatureIndex, setAttributes, setConstantPool, setNameIndex, setSignatureIndex
getAccessFlags, getModifiers, isAbstract, isAbstract, isAnnotation, isAnnotation, isEnum, isEnum, isFinal, isFinal, isInterface, isInterface, isNative, isNative, isPrivate, isPrivate, isProtected, isProtected, isPublic, isPublic, isStatic, isStatic, isStrictfp, isStrictfp, isSynchronized, isSynchronized, isSynthetic, isSynthetic, isTransient, isTransient, isVolatile, isVolatile, setAccessFlags, setModifiers
private static BCELComparator _cmp
public Method()
public Method(Method c)
Method(java.io.DataInputStream file, ConstantPool constant_pool) throws java.io.IOException, ClassFormatException
file
- Input streamjava.io.IOException
ClassFormatException
public Method(int access_flags, int name_index, int signature_index, Attribute[] attributes, ConstantPool constant_pool)
access_flags
- Access rights of methodname_index
- Points to field name in constant poolsignature_index
- Points to encoded signatureattributes
- Collection of attributesconstant_pool
- Array of constantspublic void accept(Visitor v)
v
- Visitor objectpublic final Code getCode()
public final ExceptionTable getExceptionTable()
public final LocalVariableTable getLocalVariableTable()
public final LineNumberTable getLineNumberTable()
public final java.lang.String toString()
toString
in class java.lang.Object
public final Method copy(ConstantPool _constant_pool)
public Type getReturnType()
public Type[] getArgumentTypes()
public static BCELComparator getComparator()
public static void setComparator(BCELComparator comparator)
comparator
- Comparison strategy objectpublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()