@Provides(type = Provides.Type.SET) TypeAdapter upperZone() { return new TypeAdapter<Zone>() { @Override public void write(JsonWriter out, Zone value) throws IOException { throw new IllegalArgumentException(); } @Override public Zone read(JsonReader in) throws IOException { in.beginObject(); Zone zone = new Zone(); while (in.hasNext()) { zone.put(in.nextName(), in.nextString().toUpperCase()); } in.endObject(); return zone; } }; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|