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