|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IMethodCollection
An abstraction of the 'methods' component of .class format. The contents
are Method_info
structures corresponding to all methods directly
declared by this class/interface. The order in which they appear is
unspecified.
Method Summary | |
---|---|
void |
accept(IClassDefVisitor visitor,
java.lang.Object ctx)
|
int |
add(Method_info method)
Adds a new Method_info descriptor to this collection. |
java.lang.Object |
clone()
|
int[] |
get(ClassDef cls,
java.lang.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]. |
Methods inherited from interface com.vladium.jcd.compiler.IClassFormatOutput |
---|
writeInClassFormat |
Method Detail |
---|
Method_info get(int offset)
Method_info
descriptor at a given offset.
offset
- method offset [must be in [0, size()) range; input not checked]
java.lang.IndexOutOfBoundsException
- if 'offset' is outside of valid rangeint[] get(ClassDef cls, java.lang.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]
java.lang.IllegalArgumentException
- if 'cls' is nullint size()
java.lang.Object clone()
void accept(IClassDefVisitor visitor, java.lang.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]
java.lang.IndexOutOfBoundsException
- if 'offset' is outside of valid rangeMethod_info remove(int offset)
offset
- method offset [must be in [0, size()) range; input not checked]
java.lang.IndexOutOfBoundsException
- if 'offset' is outside of valid range
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |