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.Reference; import st.gravel.support.compiler.ast.Reference.Reference_Factory; import st.gravel.support.compiler.ast.ClassReference; public class AbsoluteReference extends Reference implements Cloneable { public static AbsoluteReference_Factory factory = new AbsoluteReference_Factory(); st.gravel.core.Symbol[] _path; public static class AbsoluteReference_Factory extends Reference_Factory { public AbsoluteReference basicNew() { AbsoluteReference newInstance = new AbsoluteReference(); newInstance.initialize(); return newInstance; } public AbsoluteReference object() { return this.path_(new st.gravel.core.Symbol[] { st.gravel.core.Symbol.value("st"), st.gravel.core.Symbol.value("gravel"), st.gravel.core.Symbol.value("lang"), st.gravel.core.Symbol.value("Object") }); } public AbsoluteReference path_(final st.gravel.core.Symbol[] _anArray) { return ((AbsoluteReference) this.basicNew().initializePath_(_anArray)); } } static public AbsoluteReference _object(Object receiver) { return factory.object(); } static public AbsoluteReference _path_(Object receiver, final st.gravel.core.Symbol[] _anArray) { return factory.path_(_anArray); } public AbsoluteReference $slash$(final st.gravel.core.Symbol _aSymbol) { return AbsoluteReference.factory.path_(st.gravel.support.jvm.ArrayExtensions.copyWith_(_path, _aSymbol)); } public AbsoluteReference copy() { try { AbsoluteReference _temp1 = (AbsoluteReference) this.clone(); _temp1.postCopy(); return _temp1; } catch (CloneNotSupportedException e) { throw new RuntimeException(e); } } @Override public boolean equals(final Object _anObject) { if (!(this.getClass() == _anObject.getClass())) { return false; } if (this._path == null) { if (!(((AbsoluteReference) _anObject)._path == null)) { return false; } } else { if (!st.gravel.support.jvm.ArrayExtensions.equals_(this._path, ((AbsoluteReference) _anObject)._path)) { return false; } } return true; } public AbsoluteReference_Factory factory() { return factory; } @Override public int hashCode() { final int[] _hash; _hash = new int[1]; _hash[0] = 13; for (final st.gravel.core.Symbol _elem : _path) { _hash[0] = (_hash[0] ^ (_elem == null ? 0 : _elem.hashCode())); } return _hash[0]; } public AbsoluteReference initializePath_(final st.gravel.core.Symbol[] _anArray) { _path = _anArray; this.initialize(); return this; } @Override public boolean isMeta() { return false; } @Override public Reference meta() { return ClassReference.factory.reference_(this); } public st.gravel.core.Symbol name() { return _path[_path.length - 1]; } @Override public AbsoluteReference namespace() { return AbsoluteReference.factory.path_(st.gravel.support.jvm.ArrayExtensions.copyWithoutLast(_path)); } @Override public AbsoluteReference nonmeta() { return this; } public st.gravel.core.Symbol[] path() { return _path; } @Override public AbsoluteReference printOn_(final StringBuilder _aStream) { boolean _temp1 = true; for (final st.gravel.core.Symbol _elem : _path) { if (_temp1) { _temp1 = false; } else { _aStream.append('.'); } _aStream.append(_elem.asString()); } return this; } }