private static String signatureEncoding(TypeMirror type) {
    switch (type.getKind()) {
      case ARRAY:
        return "[" + signatureEncoding(asArray(type).getComponentType());
      case BYTE:
        return "B";
      case SHORT:
        return "S";
      case INT:
        return "I";
      case LONG:
        return "J";
      case FLOAT:
        return "F";
      case DOUBLE:
        return "D";
      case CHAR:
        return "C";
      case BOOLEAN:
        return "Z";
      case DECLARED:
        return "L" + internalName(asTypeElement(type)) + ";";
      default:
        throw new AssertionError("Bad signature type " + type);
    }
  }
Given a class like {@code foo.bar.Outer.Inner}, produces a string like {@code
"foo/bar/Outer$Inner"}, which is the way the class is referenced in the JVM.
value/src/main/java/com/google/auto/value/processor/ForwardingClassGenerator.java