package st.gravel.support.compiler.jvm;
/*
This file is automatically generated from typed smalltalk source. Do not edit by hand.
(C) AG5.com
*/
import java.math.BigInteger;
import st.gravel.support.jvm.NonLocalReturn;
import st.gravel.support.compiler.jvm.JVMControlFlowInstruction;
import st.gravel.support.compiler.jvm.JVMControlFlowInstruction.JVMControlFlowInstruction_Factory;
import st.gravel.support.compiler.jvm.Frame;
import st.gravel.support.compiler.jvm.JVMDefinedObjectType;
import st.gravel.support.compiler.jvm.JVMInstructionVisitor;
import st.gravel.support.compiler.jvm.JVMStack;
import st.gravel.support.compiler.jvm.JVMInstruction;
import st.gravel.support.compiler.jvm.JVMType;
public class TryCatch extends JVMControlFlowInstruction implements Cloneable {
public static TryCatch_Factory factory = new TryCatch_Factory();
Frame _catchFrame;
Frame _doFrame;
JVMDefinedObjectType _exception;
Frame _tryFrame;
public static class TryCatch_Factory extends JVMControlFlowInstruction_Factory {
public TryCatch basicNew() {
TryCatch newInstance = new TryCatch();
newInstance.initialize();
return newInstance;
}
public TryCatch tryFrame_doFrame_exception_catchFrame_(final Frame _aFrame, final Frame _aFrame2, final JVMDefinedObjectType _aJVMDefinedObjectType, final Frame _aFrame3) {
return this.basicNew().initializeTryFrame_doFrame_exception_catchFrame_(_aFrame, _aFrame2, _aJVMDefinedObjectType, _aFrame3);
}
public TryCatch tryFrame_exception_catchFrame_(final Frame _aFrame, final JVMDefinedObjectType _aJVMDefinedObjectType, final Frame _aFrame2) {
return this.tryFrame_doFrame_exception_catchFrame_(_aFrame, null, _aJVMDefinedObjectType, _aFrame2);
}
}
static public TryCatch _tryFrame_doFrame_exception_catchFrame_(Object receiver, final Frame _aFrame, final Frame _aFrame2, final JVMDefinedObjectType _aJVMDefinedObjectType, final Frame _aFrame3) {
return factory.tryFrame_doFrame_exception_catchFrame_(_aFrame, _aFrame2, _aJVMDefinedObjectType, _aFrame3);
}
static public TryCatch _tryFrame_exception_catchFrame_(Object receiver, final Frame _aFrame, final JVMDefinedObjectType _aJVMDefinedObjectType, final Frame _aFrame2) {
return factory.tryFrame_exception_catchFrame_(_aFrame, _aJVMDefinedObjectType, _aFrame2);
}
@Override
public <X> X accept_(final JVMInstructionVisitor<X> _visitor) {
return _visitor.visitTryCatch_(this);
}
public Frame catchFrame() {
return _catchFrame;
}
public TryCatch copy() {
try {
TryCatch _temp1 = (TryCatch) this.clone();
_temp1.postCopy();
return _temp1;
} catch (CloneNotSupportedException e) {
throw new RuntimeException(e);
}
}
public Frame doFrame() {
return _doFrame;
}
@Override
public JVMInstruction effectStack_(final JVMStack _aJVMStack) {
return this;
}
public JVMDefinedObjectType exception() {
return _exception;
}
public TryCatch_Factory factory() {
return factory;
}
public TryCatch initializeTryFrame_doFrame_exception_catchFrame_(final Frame _aFrame, final Frame _aFrame2, final JVMDefinedObjectType _aJVMDefinedObjectType, final Frame _aFrame3) {
_tryFrame = _aFrame;
_doFrame = _aFrame2;
_exception = _aJVMDefinedObjectType;
_catchFrame = _aFrame3;
this.initialize();
return this;
}
@Override
public TryCatch printOn_(final StringBuilder _aStream) {
final String _title;
_title = this.factory().toString();
_aStream.append(st.gravel.support.jvm.CharacterExtensions.isVowel(_title.charAt(0)) ? "an " : "a ");
_aStream.append(_title);
_aStream.append('[');
this.sourceOn_(_aStream);
_aStream.append(']');
return this;
}
@Override
public TryCatch sourceOn_(final StringBuilder _aStream) {
return this;
}
public Frame tryFrame() {
return _tryFrame;
}
@Override
public TryCatch withReturnType_(final JVMType _aType) {
if (st.gravel.support.jvm.ObjectExtensions.equals_(this.type(), _aType)) {
return TryCatch.this;
}
throw new RuntimeException("niy");
}
}