Class GsonModule.CredentialsAdapterFactory

java.lang.Object
com.google.gson.TypeAdapter<Credentials>
org.jclouds.json.config.GsonModule.CredentialsAdapterFactory
All Implemented Interfaces:
com.google.gson.TypeAdapterFactory
Enclosing class:
GsonModule

public static class GsonModule.CredentialsAdapterFactory extends com.google.gson.TypeAdapter<Credentials> implements com.google.gson.TypeAdapterFactory
Special cases serialization for LoginCredentials and normalizes all others.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> com.google.gson.TypeAdapter<T>
    create(com.google.gson.Gson gson, com.google.gson.reflect.TypeToken<T> typeToken)
     
    read(com.google.gson.stream.JsonReader in)
     
    void
    write(com.google.gson.stream.JsonWriter out, Credentials credentials)
     

    Methods inherited from class com.google.gson.TypeAdapter

    fromJson, fromJson, fromJsonTree, nullSafe, toJson, toJson, toJsonTree

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CredentialsAdapterFactory

      public CredentialsAdapterFactory()
  • Method Details

    • write

      public void write(com.google.gson.stream.JsonWriter out, Credentials credentials) throws IOException
      Specified by:
      write in class com.google.gson.TypeAdapter<Credentials>
      Throws:
      IOException
    • read

      public Credentials read(com.google.gson.stream.JsonReader in) throws IOException
      Specified by:
      read in class com.google.gson.TypeAdapter<Credentials>
      Throws:
      IOException
    • create

      public <T> com.google.gson.TypeAdapter<T> create(com.google.gson.Gson gson, com.google.gson.reflect.TypeToken<T> typeToken)
      Specified by:
      create in interface com.google.gson.TypeAdapterFactory