protected Object parseValue(JsonReader reader, String name) throws Exception { switch (JsonValues.valueOf(name)) { case type: this.type = StringFilterMapping.getType(reader.nextString()); if (this.type != null) { TypeAdapter adapter = GSON.getAdapter(this.type); if (adapter instanceof GeneralAdapter) { this.delegate = (GeneralAdapter) adapter; } } return this.type; } return null; }
protected void writeValues(JsonWriter writer, StringFilter value) throws IOException { String typeName = StringFilterMapping.getTypeName(value); writer.name(JsonValues.type.name()).value(typeName); }