return false;
}
@Override
public final String toString() {
final PlainTextOutput output = new PlainTextOutput();
switch (_nodeType) {
case Normal: {
output.write("Block #%d", _blockIndex);
if (_start != null) {
output.write(": %d to %d", _start.getOffset(), _end.getEndOffset());
}
break;
}
case CatchHandler:
case FinallyHandler: {
output.write("Block #%d: %s: ", _blockIndex, _nodeType);
DecompilerHelpers.writeExceptionHandler(output, _exceptionHandler);
break;
}
default: {
output.write("Block #%d: %s", _blockIndex, _nodeType);
break;
}
}
output.indent();
if (!_dominanceFrontier.isEmpty()) {
output.writeLine();
output.write("DominanceFrontier: ");
final int[] blockIndexes = new int[_dominanceFrontier.size()];
int i = 0;
for (final ControlFlowNode node : _dominanceFrontier) {
blockIndexes[i++] = node._blockIndex;
}
Arrays.sort(blockIndexes);
output.write(
StringUtilities.join(
", ",
new Iterable<String>() {
@NotNull
@Override
public Iterator<String> iterator() {
return new Iterator<String>() {
private int _position = 0;
@Override
public boolean hasNext() {
return _position < blockIndexes.length;
}
@Override
public String next() {
if (!hasNext()) {
throw new NoSuchElementException();
}
return String.valueOf(blockIndexes[_position++]);
}
@Override
public void remove() {
throw ContractUtils.unreachable();
}
};
}
}
)
);
}
for (final Instruction instruction : getInstructions()) {
output.writeLine();
DecompilerHelpers.writeInstruction(output, instruction);
}
final Object userData = _userData;
if (userData != null) {
output.writeLine();
output.write(String.valueOf(userData));
}
output.unindent();
return output.toString();
}