package st.gravel.support.compiler.ast;
/*
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.ast.SourceFile;
public class SourcePosition extends Object implements Cloneable {
public static SourcePosition_Factory factory = new SourcePosition_Factory();
SourceFile _sourceFile;
int _start;
int _stop;
public static class SourcePosition_Factory extends st.gravel.support.jvm.SmalltalkFactory {
public SourcePosition basicNew() {
SourcePosition newInstance = new SourcePosition();
newInstance.initialize();
return newInstance;
}
public SourcePosition sourceFile_start_stop_(final SourceFile _aSourceFile, final int _anInteger, final int _anInteger2) {
return this.basicNew().initializeSourceFile_start_stop_(_aSourceFile, _anInteger, _anInteger2);
}
}
static public SourcePosition _sourceFile_start_stop_(Object receiver, final SourceFile _aSourceFile, final int _anInteger, final int _anInteger2) {
return factory.sourceFile_start_stop_(_aSourceFile, _anInteger, _anInteger2);
}
public SourcePosition copy() {
try {
SourcePosition _temp1 = (SourcePosition) this.clone();
_temp1.postCopy();
return _temp1;
} catch (CloneNotSupportedException e) {
throw new RuntimeException(e);
}
}
public boolean equals(final Object _anObject) {
if (!(this.getClass() == _anObject.getClass())) {
return false;
}
if (this._sourceFile == null) {
if (!(((SourcePosition) _anObject)._sourceFile == null)) {
return false;
}
} else {
if (!st.gravel.support.jvm.ObjectExtensions.equals_(this._sourceFile, ((SourcePosition) _anObject)._sourceFile)) {
return false;
}
}
if (!st.gravel.support.jvm.IntegerExtensions.equals_(this._start, ((SourcePosition) _anObject)._start)) {
return false;
}
if (!st.gravel.support.jvm.IntegerExtensions.equals_(this._stop, ((SourcePosition) _anObject)._stop)) {
return false;
}
return true;
}
public SourcePosition_Factory factory() {
return factory;
}
public int hashCode() {
return ((((this.factory() == null ? 0 : this.factory().hashCode()) ^ (_sourceFile == null ? 0 : _sourceFile.hashCode())) ^ _start) ^ _stop);
}
public SourcePosition initialize() {
return this;
}
public SourcePosition initializeSourceFile_start_stop_(final SourceFile _aSourceFile, final int _anInteger, final int _anInteger2) {
_sourceFile = _aSourceFile;
_start = _anInteger;
_stop = _anInteger2;
this.initialize();
return this;
}
public SourcePosition postCopy() {
return this;
}
public SourceFile sourceFile() {
return _sourceFile;
}
public int start() {
return _start;
}
public int stop() {
return _stop;
}
}