All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.gerrit.entities.AutoValueGson_EntitiesAdapterFactory Maven / Gradle / Ivy

The newest version!
package com.google.gerrit.entities;

import com.google.gson.Gson;
import com.google.gson.TypeAdapter;
import com.google.gson.reflect.TypeToken;
import java.lang.Override;
import java.lang.SuppressWarnings;
import javax.annotation.processing.Generated;

@Generated(
    value = "com.ryanharter.auto.value.gson.factory.AutoValueGsonAdapterFactoryProcessor",
    comments = "https://github.com/rharter/auto-value-gson"
)
final class AutoValueGson_EntitiesAdapterFactory extends EntitiesAdapterFactory {
  @Override
  @SuppressWarnings("unchecked")
  public  TypeAdapter create(Gson gson, TypeToken type) {
    Class rawType = type.getRawType();
    if (Change.Key.class.isAssignableFrom(rawType)) {
      return (TypeAdapter) Change.Key.typeAdapter(gson);
    } else if (SubmitRequirement.class.isAssignableFrom(rawType)) {
      return (TypeAdapter) SubmitRequirement.typeAdapter(gson);
    } else if (SubmitRequirementExpression.class.isAssignableFrom(rawType)) {
      return (TypeAdapter) SubmitRequirementExpression.typeAdapter(gson);
    } else if (SubmitRequirementExpressionResult.class.isAssignableFrom(rawType)) {
      return (TypeAdapter) SubmitRequirementExpressionResult.typeAdapter(gson);
    } else if (SubmitRequirementResult.class.isAssignableFrom(rawType)) {
      return (TypeAdapter) SubmitRequirementResult.typeAdapter(gson);
    } else {
      return null;
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy