Fork of the Fernflower decompiler
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
fernflower/src/org/jetbrains/java/decompiler/modules/decompiler/stats/RootStatement.java

29 lines
994 B

// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.java.decompiler.modules.decompiler.stats;
import org.jetbrains.java.decompiler.main.collectors.BytecodeMappingTracer;
import org.jetbrains.java.decompiler.modules.decompiler.ExprProcessor;
import org.jetbrains.java.decompiler.util.TextBuffer;
public class RootStatement extends Statement {
private final DummyExitStatement dummyExit;
public RootStatement(Statement head, DummyExitStatement dummyExit) {
type = Statement.TYPE_ROOT;
first = head;
this.dummyExit = dummyExit;
stats.addWithKey(first, first.id);
first.setParent(this);
}
@Override
public TextBuffer toJava(int indent, BytecodeMappingTracer tracer) {
return ExprProcessor.listToJava(varDefinitions, indent, tracer).append(first.toJava(indent, tracer));
}
public DummyExitStatement getDummyExit() {
return dummyExit;
}
}