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