public class MutableMethodImplementation extends java.lang.Object implements MethodImplementation
| Constructor and Description |
|---|
MutableMethodImplementation(int registerCount) |
MutableMethodImplementation(MethodImplementation methodImplementation) |
| Modifier and Type | Method and Description |
|---|---|
void |
addCatch(Label from,
Label to,
Label handler) |
void |
addCatch(java.lang.String type,
Label from,
Label to,
Label handler) |
void |
addCatch(TypeReference type,
Label from,
Label to,
Label handler) |
void |
addInstruction(BuilderInstruction instruction) |
void |
addInstruction(int index,
BuilderInstruction instruction) |
java.lang.Iterable<? extends DebugItem> |
getDebugItems()
Get a list of debug items for this method.
|
java.util.List<BuilderInstruction> |
getInstructions()
Gets the instructions in this method.
|
int |
getRegisterCount()
Gets the number of registers in this method.
|
java.util.List<BuilderTryBlock> |
getTryBlocks()
Gets a list of the try blocks defined for this method.
|
Label |
newLabelForAddress(int codeAddress) |
Label |
newLabelForIndex(int instructionIndex) |
Label |
newSwitchPayloadReferenceLabel(MethodLocation switchLocation,
int[] codeAddressToIndex,
int codeAddress) |
void |
removeInstruction(int index) |
void |
replaceInstruction(int index,
BuilderInstruction replacementInstruction) |
void |
swapInstructions(int index1,
int index2) |
public MutableMethodImplementation(@Nonnull
MethodImplementation methodImplementation)
public MutableMethodImplementation(int registerCount)
public int getRegisterCount()
MethodImplementationgetRegisterCount in interface MethodImplementation@Nonnull public java.util.List<BuilderInstruction> getInstructions()
MethodImplementationgetInstructions in interface MethodImplementation@Nonnull public java.util.List<BuilderTryBlock> getTryBlocks()
MethodImplementationgetTryBlocks in interface MethodImplementation@Nonnull public java.lang.Iterable<? extends DebugItem> getDebugItems()
MethodImplementationgetDebugItems in interface MethodImplementationpublic void addCatch(@Nullable
TypeReference type,
@Nonnull
Label from,
@Nonnull
Label to,
@Nonnull
Label handler)
public void addCatch(@Nullable
java.lang.String type,
@Nonnull
Label from,
@Nonnull
Label to,
@Nonnull
Label handler)
public void addInstruction(int index,
BuilderInstruction instruction)
public void addInstruction(@Nonnull
BuilderInstruction instruction)
public void replaceInstruction(int index,
@Nonnull
BuilderInstruction replacementInstruction)
public void removeInstruction(int index)
public void swapInstructions(int index1,
int index2)
@Nonnull public Label newLabelForAddress(int codeAddress)
@Nonnull public Label newLabelForIndex(int instructionIndex)
@Nonnull public Label newSwitchPayloadReferenceLabel(@Nonnull MethodLocation switchLocation, @Nonnull int[] codeAddressToIndex, int codeAddress)