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.JVMInstruction;
import st.gravel.support.compiler.jvm.JVMInstruction.JVMInstruction_Factory;
import st.gravel.support.compiler.jvm.JVMDefinedObjectType;
import st.gravel.support.compiler.jvm.JVMType;
import st.gravel.support.compiler.jvm.JVMInstructionVisitor;
import st.gravel.support.compiler.jvm.JVMStack;
public class GetStatic extends JVMInstruction implements Cloneable {
public static GetStatic_Factory factory = new GetStatic_Factory();
String _name;
JVMDefinedObjectType _ownerType;
JVMType _type;
public static class GetStatic_Factory extends JVMInstruction_Factory {
public GetStatic basicNew() {
GetStatic newInstance = new GetStatic();
newInstance.initialize();
return newInstance;
}
public GetStatic ownerType_name_type_(final JVMDefinedObjectType _ownerType, final String _aString, final JVMType _type) {
st.gravel.support.jvm.ObjectExtensions.assert_(this, _ownerType != null);
st.gravel.support.jvm.ObjectExtensions.assert_(this, _type != null);
return this.basicNew().initializeOwnerType_name_type_(_ownerType, _aString, _type);
}
}
static public GetStatic _ownerType_name_type_(Object receiver, final JVMDefinedObjectType _ownerType, final String _aString, final JVMType _type) {
return factory.ownerType_name_type_(_ownerType, _aString, _type);
}
@Override
public <X> X accept_(final JVMInstructionVisitor<X> _visitor) {
return _visitor.visitGetStatic_(this);
}
public GetStatic copy() {
try {
GetStatic _temp1 = (GetStatic) this.clone();
_temp1.postCopy();
return _temp1;
} catch (CloneNotSupportedException e) {
throw new RuntimeException(e);
}
}
@Override
public JVMInstruction effectStack_(final JVMStack _aJVMStack) {
_aJVMStack.push_(this.type());
return this;
}
public GetStatic_Factory factory() {
return factory;
}
public GetStatic initializeOwnerType_name_type_(final JVMDefinedObjectType _aJVMDefinedObjectType, final String _aString, final JVMType _aJVMDefinedObjectType2) {
_ownerType = _aJVMDefinedObjectType;
_name = _aString;
_type = _aJVMDefinedObjectType2;
this.initialize();
return this;
}
public String name() {
return _name;
}
public JVMDefinedObjectType ownerType() {
return _ownerType;
}
@Override
public GetStatic 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 GetStatic sourceOn_(final StringBuilder _aStream) {
return this;
}
@Override
public JVMType type() {
return _type;
}
@Override
public GetStatic withReturnType_(final JVMType _aType) {
if (st.gravel.support.jvm.ObjectExtensions.equals_(this.type(), _aType)) {
return GetStatic.this;
}
throw new RuntimeException("niy");
}
}