public interface IMethodCollection extends Cloneable, IClassFormatOutput
Method_info structures corresponding to all methods directly
declared by this class/interface. The order in which they appear is
unspecified.| 限定符和类型 | 方法和说明 |
|---|---|
void |
accept(IClassDefVisitor visitor,
Object ctx) |
int |
add(Method_info method)
Adds a new Method_info descriptor to this collection.
|
Object |
clone() |
int[] |
get(ClassDef cls,
String name)
Returns an array of offsets for methods named 'name' (empty array if no
matching fields found).
|
Method_info |
get(int offset)
Returns
Method_info descriptor at a given offset. |
Method_info |
remove(int offset)
Removes the Method_info descriptor at a given offset.
|
Method_info |
set(int offset,
Method_info method)
Replaces the Method_info descriptor at a given offset.
|
int |
size()
Returns the number of methods in this collection [can be 0].
|
writeInClassFormatMethod_info get(int offset)
Method_info descriptor at a given offset.offset - method offset [must be in [0, size()) range; input not checked]IndexOutOfBoundsException - if 'offset' is outside of valid rangeint[] get(ClassDef cls, String name)
cls - class definition providing the constant pool against which to
resolve names [may not be null]name - method name [null or empty will result in no matches]IllegalArgumentException - if 'cls' is nullint size()
Object clone()
void accept(IClassDefVisitor visitor, Object ctx)
int add(Method_info method)
method - new method descriptor [may not be null]Method_info set(int offset, Method_info method)
offset - method offset [must be in [0, size()) range; input not checked]method - new method descriptor [may not be null]IndexOutOfBoundsException - if 'offset' is outside of valid rangeMethod_info remove(int offset)
offset - method offset [must be in [0, size()) range; input not checked]IndexOutOfBoundsException - if 'offset' is outside of valid rangeCopyright © 2018. All rights reserved.