pos
. Branch offsets and the exception table are also updated. If the instruction at the given index is at the beginning of a block statement, then the bytecode is inserted within that block.
An extra gap may be inserted at the end of the inserted bytecode sequence for adjusting alignment if the code attribute includes LOOKUPSWITCH
or TABLESWITCH
.
@param pos the index at which a byte sequence is inserted.
@param code inserted bytecode sequence.
@return the index indicating the first byte of theinserted byte sequence, which might be different from pos.
@since 3.11
-1
indicates insertion as the last element
@param editGroup the edit group in which to collect the correspondingtext edits, or null
if ungrouped
@throws IllegalArgumentException if the node is null, or if the node is not partof this rewriter's AST, or if the inserted node is not a new node (or placeholder), or if the described modification is otherwise invalid (not a member of this node's original list)
@throws IndexOutOfBoundsException if the index is negative and not -1,or if it is larger than the size of the combined list
|
|
|
|
|
|
|
|
|
|
|
|