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.PushConstant;
import st.gravel.support.compiler.jvm.PushConstant.PushConstant_Factory;
import st.gravel.support.compiler.jvm.JVMInstructionVisitor;
import st.gravel.support.compiler.jvm.JVMType;
import st.gravel.support.compiler.jvm.JVMIntType;
public class PushInt extends PushConstant implements Cloneable {
public static PushInt_Factory factory = new PushInt_Factory();
int _value;
public static class PushInt_Factory extends PushConstant_Factory {
public PushInt basicNew() {
PushInt newInstance = new PushInt();
newInstance.initialize();
return newInstance;
}
public PushInt value_(final int _anInteger) {
return this.basicNew().initializeValue_(_anInteger);
}
}
static public PushInt _value_(Object receiver, final int _anInteger) {
return factory.value_(_anInteger);
}
@Override
public <X> X accept_(final JVMInstructionVisitor<X> _visitor) {
return _visitor.visitPushInt_(this);
}
public PushInt copy() {
try {
PushInt _temp1 = (PushInt) this.clone();
_temp1.postCopy();
return _temp1;
} catch (CloneNotSupportedException e) {
throw new RuntimeException(e);
}
}
public PushInt_Factory factory() {
return factory;
}
public PushInt initializeValue_(final int _anInteger) {
_value = _anInteger;
this.initialize();
return this;
}
@Override
public PushInt 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 PushInt sourceOn_(final StringBuilder _aStream) {
return this;
}
@Override
public JVMType type() {
return JVMIntType.factory.basicNew();
}
public int value() {
return _value;
}
@Override
public PushInt withReturnType_(final JVMType _aType) {
if (st.gravel.support.jvm.ObjectExtensions.equals_(this.type(), _aType)) {
return PushInt.this;
}
throw new RuntimeException("niy");
}
}