public EnumTypeAdapter(Class<T> classOfT) { try { for (T constant : (Enum[]) classOfT.getEnumConstants()) { String name = constant.name(); SerializedName annotation = (SerializedName) classOfT.getField(name) .getAnnotation(SerializedName.class); if (annotation != null) { name = annotation.value(); } this.nameToConstant.put(name, constant); this.constantToName.put(constant, name); } } catch (NoSuchFieldException e) { throw new AssertionError(); } }
@SerializedName("where") WHERE("where"), @SerializedName("order") ORDER("order"), @SerializedName("limit") LIMIT("limit");
public EnumTypeAdapter(Class<T> classOfT) { try { for (T constant : classOfT.getEnumConstants()) { String name = constant.name(); SerializedName annotation = classOfT.getField(name).getAnnotation(SerializedName.class); if (annotation != null) { name = annotation.value(); } nameToConstant.put(name, constant); constantToName.put(constant, name); } } catch (NoSuchFieldException e) { throw new AssertionError(); } }
@SerializedName("userpic_url") public abstract String userpicUrl();
@SerializedName("email") public String getEmail() { return email; }
@SerializedName("Email") public abstract String email();
@SerializedName("Password") public abstract String password();
@SerializedName("name") public abstract String name();
@SerializedName("message") public abstract double message();
@Nullable @SerializedName("l") List<String> list();
@SerializedName("v") public abstract String val();
@SerializedName("day") public abstract double day();
@SerializedName("i") public abstract List<Integer> ints();
@Value.Default @SerializedName("e1") public RetentionPolicy enum1() { return RetentionPolicy.SOURCE; }
@SerializedName("coord") public abstract Coordinates coord();
@NonNull @SerializedName("pseudo") public abstract String pseudo();
@NonNull @SerializedName("date") public abstract Date date();
@SerializedName("repos_url") public abstract String reposUrl();
@SerializedName("night") public abstract double night();
@SerializedName("main") public abstract String main();
@SerializedName("id") public abstract Integer id();
@SerializedName("shortDescription") public abstract String shortDescription();
@SerializedName("description") public abstract String description();
@SerializedName("min") public abstract double min();
@SerializedName("size") public abstract int size();
@SerializedName("image") public abstract String image();
@SerializedName("steps") public abstract List<JsonStep> steps();
@SerializedName("id") public abstract String id();
@SerializedName("id") public abstract double id();
@SerializedName("response") public abstract T response();
@SerializedName("avatar_url") public abstract String avatarUrl();
@SerializedName("id") public abstract int id();
@SerializedName("user") public abstract UserJSONModel user();
private String getFieldName(Field f) { SerializedName serializedName = f.getAnnotation(SerializedName.class); return serializedName == null ? fieldNamingPolicy.translateName(f) : serializedName.value(); }
@SerializedName("username") public void setUsername(String username) { this.username = username; }
/** * mode to use. * @return String */ @Value.Default @SerializedName("mode") public String getMode() { return "geth_ipc"; }
@SerializedName("lastname") public abstract String lastname();
@SerializedName("temp") public abstract double currentTemp();