public static Stella_Object yieldTypeSpecTree(StandardObject self) {
    { Surrogate testValue000 = Stella_Object.safePrimaryType(self);

      if (Surrogate.subtypeOfSurrogateP(testValue000)) {
        { Surrogate self000 = ((Surrogate)(self));

          return (Symbol.internSymbolInModule(self000.symbolName, ((Module)(self000.homeContext)), true));
        }
      }
      else if (Surrogate.subtypeOfParametricTypeSpecifierP(testValue000)) {
        { ParametricTypeSpecifier self000 = ((ParametricTypeSpecifier)(self));

          { Cons listoftypes = Stella.NIL;

            { StandardObject ts = null;
              Cons iter000 = self000.specifierParameterTypes.theConsList;
              Cons collect000 = null;

              for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
                ts = ((StandardObject)(iter000.value));
                if (collect000 == null) {
                  {
                    collect000 = Cons.cons(StandardObject.yieldTypeSpecTree(ts), Stella.NIL);
                    if (listoftypes == Stella.NIL) {
                      listoftypes = collect000;
                    }
                    else {
                      Cons.addConsToEndOfConsList(listoftypes, collect000);
                    }
                  }
                }
                else {
                  {
                    collect000.rest = Cons.cons(StandardObject.yieldTypeSpecTree(ts), Stella.NIL);
                    collect000 = collect000.rest;
                  }
                }
              }
            }
            return (Cons.cons(Symbol.internSymbolInModule(self000.specifierBaseType.symbolName, ((Module)(self000.specifierBaseType.homeContext)), true), ((StandardObject.arrayTypeSpecifierP(self000) ? Cons.list$(Cons.cons(Stella.SYM_STELLA_SIZE, Cons.cons(ParametricTypeSpecifier.yieldArrayDimensionsTree(self000), Cons.cons(Stella.NIL, Stella.NIL)))) : Stella.NIL)).concatenate(Cons.cons(Stella.SYM_STELLA_OF, listoftypes.concatenate(Stella.NIL, Stella.NIL)), Stella.NIL)));
          }
        }
      }
      else if (Surrogate.subtypeOfAnchoredTypeSpecifierP(testValue000)) {
        { AnchoredTypeSpecifier self000 = ((AnchoredTypeSpecifier)(self));

          if (self000.specifierParameterName != null) {
            return (Cons.list$(Cons.cons(Stella.SYM_STELLA_LIKE, Cons.cons(Cons.cons(self000.specifierParameterName, Cons.cons(Stella.SYM_STELLA_SELF, Stella.NIL)), Cons.cons(Stella.NIL, Stella.NIL)))));
          }
          else {
            return (Cons.list$(Cons.cons(Stella.SYM_STELLA_LIKE, Cons.cons(Stella.SYM_STELLA_SELF, Cons.cons(Stella.NIL, Stella.NIL)))));
          }
        }
      }
      else {
        { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

          stream000.nativeStream.print("validate-type-specifier: Not defined on `" + self + "'");
          throw ((StellaException)(StellaException.newStellaException(stream000.theStringReader()).fillInStackTrace()));
        }
      }
    }
  }