public static StringWrapper javaTranslateGlobalName(Symbol namesymbol, boolean definitionP) {
    if (namesymbol == null) {
      return (StringWrapper.wrapString("NULL"));
    }
    if (!(definitionP)) {
      if (namesymbol == Stella.SYM_STELLA_TRUE) {
        return (Stella.$JAVA_TRUE_STRING_WRAPPER$);
      }
      if (namesymbol == Stella.SYM_STELLA_FALSE) {
        return (Stella.$JAVA_FALSE_STRING_WRAPPER$);
      }
    }
    { String rawname = Stella.javaSubstituteForbiddenCharacters(GeneralizedSymbol.javaChangeCase(namesymbol, Stella.KWD_UPPERCASE), Stella.KWD_UPPERCASE);
      Module module = namesymbol.homeModule();

      if (definitionP) {
        return (StringWrapper.wrapString(rawname));
      }
      else if (Module.omitJavaPackagePrefixP(module, Stella.javaYieldFlotsamTypeName(Module.javaYieldFlotsamClassName(module)))) {
        return (StringWrapper.wrapString(Stella.javaPrependGlobalClassName(rawname, module)));
      }
      else {
        return (StringWrapper.wrapString(Module.javaPackagePrefix(module, ".") + Stella.javaPrependGlobalClassName(rawname, module)));
      }
    }
  }