Android ReflectiveTypeAdapterFactory - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android ReflectiveTypeAdapterFactory class.

This code example shows how to use the following methods:
    // type adapters for composite and user-defined types 
    factories.add(new CollectionTypeAdapterFactory(constructorConstructor));
    factories.add(new MapTypeAdapterFactory(constructorConstructor, complexMapKeySerialization));
    factories.add(new ReflectiveTypeAdapterFactory(
        constructorConstructor, fieldNamingPolicy, excluder));
    this.factories = Collections.unmodifiableList(factories);
  private TypeAdapter<Number> doubleAdapter(boolean serializeSpecialFloatingPointValues) {
    if (serializeSpecialFloatingPointValues) {
      return TypeAdapters.DOUBLE;
    return new TypeAdapter<Number>() {
      @Override public Double read(JsonReader in) throws IOException {
        if (in.peek() == JsonToken.NULL) {
          return null; 
Experience pair programming with AI  Get Codota for Java
See Code Examples for Android ReflectiveTypeAdapterFactory Methods: