private static TypeMirror getContainedType(TypeMirror type) {
    return MoreTypes.asDeclared(type).getTypeArguments().get(0);
  }
Gets the given type's first type argument.

<p>Returns the {@code T} in {@code Optional<T>}.
value/src/main/java/com/google/auto/value/extension/serializable/serializer/impl/OptionalSerializerExtension.java