code: private static void appendDeclaringTypes(TypeReference typeRef, char innerClassDelimiter,
        StringBuilder sb) {
      TypeReference declaringType = typeRef.getDeclaringType();
      if (declaringType != null) {
        appendDeclaringTypes(declaringType, innerClassDelimiter, sb);
        sb.append(declaringType.getSimpleName());
        sb.append(innerClassDelimiter);
      }
    }
docs: Recurse depth-first so order of declaring types is correct.