@Nullable @Override public Iterable<? extends DebugItem> apply(@Nullable MethodLocation input) { assert input != null; if (fixInstructions) { throw new IllegalStateException("This iterator was invalidated by a change to" + " this MutableMethodImplementation."); } return input.getDebugItems(); } }));
MethodLocation debugLocation = instructionList.get(locationIndex); BuilderDebugItem builderDebugItem = convertDebugItem(debugItem); debugLocation.getDebugItems().add(builderDebugItem); builderDebugItem.location = debugLocation;
@Nullable @Override public Iterable<? extends DebugItem> apply(@Nullable MethodLocation input) { assert input != null; if (fixInstructions) { throw new IllegalStateException("This iterator was invalidated by a change to" + " this MutableMethodImplementation."); } return input.getDebugItems(); } }));
@Nullable @Override public Iterable<? extends DebugItem> apply(@Nullable MethodLocation input) { assert input != null; if (fixInstructions) { throw new IllegalStateException("This iterator was invalidated by a change to" + " this MutableMethodImplementation."); } return input.getDebugItems(); } }));
@Nullable @Override public Iterable<? extends DebugItem> apply(@Nullable MethodLocation input) { assert input != null; if (fixInstructions) { throw new IllegalStateException("This iterator was invalidated by a change to" + " this MutableMethodImplementation."); } return input.getDebugItems(); } }));
@Nullable @Override public Iterable<? extends DebugItem> apply(@Nullable MethodLocation input) { assert input != null; if (fixInstructions) { throw new IllegalStateException("This iterator was invalidated by a change to" + " this MutableMethodImplementation."); } return input.getDebugItems(); } }));
public void addSetSourceFile(@Nullable StringReference sourceFile) { getDebugItems().add(new BuilderSetSourceFile(sourceFile)); } }
public void addLineNumber(int lineNumber) { getDebugItems().add(new BuilderLineNumber(lineNumber)); }
public void addStartLocal(int registerNumber, @Nullable StringReference name, @Nullable TypeReference type, @Nullable StringReference signature) { getDebugItems().add(new BuilderStartLocal(registerNumber, name, type, signature)); }
public void addStartLocal(int registerNumber, @Nullable StringReference name, @Nullable TypeReference type, @Nullable StringReference signature) { getDebugItems().add(new BuilderStartLocal(registerNumber, name, type, signature)); }
public void addPrologue() { getDebugItems().add(new BuilderPrologueEnd()); }
public void addEndLocal(int registerNumber) { getDebugItems().add(new BuilderEndLocal(registerNumber)); }
public void addSetSourceFile(@Nullable StringReference sourceFile) { getDebugItems().add(new BuilderSetSourceFile(sourceFile)); } }
public void addLineNumber(int lineNumber) { getDebugItems().add(new BuilderLineNumber(lineNumber)); }
public void addRestartLocal(int registerNumber) { getDebugItems().add(new BuilderRestartLocal(registerNumber)); }
public void addPrologue() { getDebugItems().add(new BuilderPrologueEnd()); }
public void addEpilogue() { getDebugItems().add(new BuilderEpilogueBegin()); }
public void addPrologue() { getDebugItems().add(new BuilderPrologueEnd()); }
public void addStartLocal(int registerNumber, @Nullable StringReference name, @Nullable TypeReference type, @Nullable StringReference signature) { getDebugItems().add(new BuilderStartLocal(registerNumber, name, type, signature)); }
private void doTestMergeIntoKeepsOrderOfDebugItems(int countLocation1, int countLocation2) { MethodLocation location1 = new MethodLocation(null, 123, 1); MethodLocation location2 = new MethodLocation(null, 456, 2); List<BuilderDebugItem> items1 = createItems(countLocation1); List<BuilderDebugItem> items2 = createItems(countLocation2); location1.getDebugItems().addAll(items1); location2.getDebugItems().addAll(items2); location1.mergeInto(location2); Assert.assertEquals(Sets.newHashSet(), location1.getDebugItems()); // items1 appear BEFORE items2 List<BuilderDebugItem> expectedItems = new ArrayList<>(items1); expectedItems.addAll(items2); Assert.assertEquals(expectedItems, new ArrayList<>(location2.getDebugItems())); }