public static interface JsonAdapter.Factory
Modifier and Type | Method and Description |
---|---|
JsonAdapter<?> |
create(Type type,
Set<? extends Annotation> annotations,
Moshi moshi)
Attempts to create an adapter for
type annotated with annotations . |
@CheckReturnValue @Nullable JsonAdapter<?> create(Type type, Set<? extends Annotation> annotations, Moshi moshi)
type
annotated with annotations
. This
returns the adapter if one was created, or null if this factory isn't capable of creating
such an adapter.
Implementations may use Moshi.adapter(java.lang.reflect.Type)
to compose adapters of other types, or
Moshi.nextAdapter(com.squareup.moshi.JsonAdapter.Factory, java.lang.reflect.Type, java.util.Set<? extends java.lang.annotation.Annotation>)
to delegate to the underlying adapter of the same type.
Copyright © 2018. All rights reserved.