private static boolean hasSerializableInterface(Context context) {
    final TypeMirror serializableTypeMirror =
        context
            .processingEnvironment()
            .getElementUtils()
            .getTypeElement(Serializable.class.getCanonicalName())
            .asType();

    return context
        .processingEnvironment()
        .getTypeUtils()
        .isAssignable(context.autoValueClass().asType(), serializableTypeMirror);
  }
Maps a serializable type back to its original AutoValue property.
value/src/main/java/com/google/auto/value/extension/serializable/processor/SerializableAutoValueExtension.java