private void insertTypeAnnotationsIfPresent(TypeMirror type, int typeStart, int typeEnd) {
    List<? extends AnnotationMirror> annotations = AnnotationMirrors.from(type);
    if (!annotations.isEmpty()) {
      StringBuilder annotationBuffer = typeAnnotationsToBuffer(annotations, false);
      int insertionIndex = typeStart + buffer.substring(typeStart, typeEnd).lastIndexOf('.') + 1;
      buffer.insert(insertionIndex, annotationBuffer);
    }
  }
Encapsulates routines and various hacks for get relevant strings for the raw types and type
parameters, while attempting to resolve unresolved types using source imports.
value-processor/src/org/immutables/value/processor/meta/TypeStringProvider.java