private ReadAttempt readInAttempt(JsonReader in) throws IOException {
    // check Callable marker for Jackson implementation
    if (in instanceof Callable<?>) {
      // if done inside 'if' we would not leak runtime dependency on Jackson
      if (in instanceof JsonParserReader) {
        return newJacksonAttempt((JsonParserReader) in);
      }
    }
    return newGsonAttempt(in);
  }
Creates adapter from {@link Gson} and type tokens.
@param <T> the generic type
@param gson Gson instance
@param type supertype token
@param subtypes subtype tokens
@return subtype adapter
gson/src/org/immutables/gson/adapter/ExpectedSubtypesAdapter.java