boolean isMapOrMultimap(TypeMirror type) {
      TypeMirror mapType = elements.getTypeElement("java.util.Map").asType();
      if (types.isAssignable(type, types.erasure(mapType))) {
        return true;
      }
      TypeElement multimapElement = elements.getTypeElement("com.google.common.collect.Multimap");
      return multimapElement != null
          && types.isAssignable(type, types.erasure(multimapElement.asType()));
    }
Returns a valid Java identifier for method or variable of type {@code type}.
value/src/main/java/com/google/auto/value/extension/toprettystring/processor/ToPrettyStringExtension.java