public static void htmlWriteHref(org.powerloom.PrintableStringWriter stream, String action, String objecttype, StandardObject renamed_Object) {
    { Surrogate testValue000 = Stella_Object.safePrimaryType(renamed_Object);

      if (Surrogate.subtypeOfP(testValue000, OntosaurusUtil.SGT_LOGIC_LOGIC_OBJECT)) {
        { LogicObject object000 = ((LogicObject)(renamed_Object));

          { Module writemodule = object000.homeModule();
            Symbol name = Logic.objectName(object000);
            String writeName = name.localPrintName(false);
            String modulePrefix = ((name == Symbol.lookupSymbolInModule(name.symbolName, ((Module)(Stella.$MODULE$.get())), false)) ? "" : (((Module)(name.homeContext)).moduleFullName + Stella.MODULE_SEPARATOR_STRING));

            if (Stella_Object.isaP(((Module)(Stella.$MODULE$.get())), OntosaurusUtil.SGT_STELLA_MODULE) &&
                ((Module)(Stella.$MODULE$.get())).allSuperContexts.memberP(writemodule)) {
              writemodule = ((Module)(Stella.$MODULE$.get()));
            }
            OntosaurusUtil.htmlWrite3PartHrefInDetail(stream, null, action, objecttype, writemodule.name(), name.visibleName(true), modulePrefix, writeName, "", false);
          }
        }
      }
      else if (Surrogate.subtypeOfP(testValue000, OntosaurusUtil.SGT_STELLA_MODULE)) {
        { Module object000 = ((Module)(renamed_Object));

          OntosaurusUtil.htmlWriteHrefInDetail(stream, null, action, objecttype, object000.name(), object000.name(), object000.name(), false);
        }
      }
      else {
        System.out.print(Stella.STANDARD_ERROR + "Don't know how to write HREF for object" + renamed_Object);
        stream.print(renamed_Object);
      }
    }
    return;
  }