Java 类com.google.gson.annotations.SerializedName 实例源码
项目:boohee_v5.6
文件:TypeAdapters.java
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();
}
}
项目:li-android-sdk-core
文件:LiQuerySetting.java
@SerializedName("where")
WHERE("where"),
@SerializedName("order")
ORDER("order"),
@SerializedName("limit")
LIMIT("limit");
项目:lams
文件:TypeAdapters.java
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();
}
}
项目:RxUploader
文件:UserJSONModel.java
@SerializedName("userpic_url")
public abstract String userpicUrl();
项目:AcopioMX
文件:Register.java
@SerializedName("email")
public String getEmail() {
return email;
}
项目:Impala
文件:LoginRequest.java
@SerializedName("Email")
public abstract String email();
项目:Impala
文件:LoginRequest.java
@SerializedName("Password")
public abstract String password();
项目:LiquidThings
文件:CurrentWeather.java
@SerializedName("name")
public abstract String name();
项目:LiquidThings
文件:Forecast.java
@SerializedName("message")
public abstract double message();
项目:GitHub
文件:NullableArray.java
@Nullable
@SerializedName("l")
List<String> list();
项目:GitHub
文件:SillyEntity.java
@SerializedName("v")
public abstract String val();
项目:LiquidThings
文件:Temperature.java
@SerializedName("day")
public abstract double day();
项目:GitHub
文件:SillyEntity.java
@SerializedName("i")
public abstract List<Integer> ints();
项目:GitHub
文件:SillySubstructure.java
@Value.Default
@SerializedName("e1")
public RetentionPolicy enum1() {
return RetentionPolicy.SOURCE;
}
项目:LiquidThings
文件:CurrentWeather.java
@SerializedName("coord")
public abstract Coordinates coord();
项目:OpenChat
文件:ChatMessage.java
@NonNull
@SerializedName("pseudo")
public abstract String pseudo();
项目:OpenChat
文件:ChatMessage.java
@NonNull
@SerializedName("date")
public abstract Date date();
项目:android-rxmvp-sandbox
文件:GithubOwner.java
@SerializedName("repos_url")
public abstract String reposUrl();
项目:LiquidThings
文件:Temperature.java
@SerializedName("night")
public abstract double night();
项目:LiquidThings
文件:Weather.java
@SerializedName("main")
public abstract String main();
项目:yabaking
文件:JsonStep.java
@SerializedName("id")
public abstract Integer id();
项目:yabaking
文件:JsonStep.java
@SerializedName("shortDescription")
public abstract String shortDescription();
项目:yabaking
文件:JsonStep.java
@SerializedName("description")
public abstract String description();
项目:LiquidThings
文件:Temperature.java
@SerializedName("min")
public abstract double min();
项目:android-rxmvp-sandbox
文件:GitHubRepo.java
@SerializedName("size")
public abstract int size();
项目:yabaking
文件:JsonRecipe.java
@SerializedName("id")
public abstract Integer id();
项目:yabaking
文件:JsonRecipe.java
@SerializedName("name")
public abstract String name();
项目:yabaking
文件:JsonRecipe.java
@SerializedName("image")
public abstract String image();
项目:yabaking
文件:JsonRecipe.java
@SerializedName("steps")
public abstract List<JsonStep> steps();
项目:android-rxmvp-sandbox
文件:GithubOwner.java
@SerializedName("id")
public abstract String id();
项目:LiquidThings
文件:Weather.java
@SerializedName("id")
public abstract double id();
项目:tumblrlikes
文件:TumblrResultVO.java
@SerializedName("response")
public abstract T response();
项目:android-rxmvp-sandbox
文件:GithubUser.java
@SerializedName("avatar_url")
public abstract String avatarUrl();
项目:RxUploader
文件:PhotoJSONModel.java
@SerializedName("id")
public abstract int id();
项目:RxUploader
文件:PhotoJSONModel.java
@SerializedName("user")
public abstract UserJSONModel user();
项目:lams
文件:ReflectiveTypeAdapterFactory.java
private String getFieldName(Field f) {
SerializedName serializedName = f.getAnnotation(SerializedName.class);
return serializedName == null ? fieldNamingPolicy.translateName(f) : serializedName.value();
}
项目:AcopioMX
文件:Register.java
@SerializedName("username")
public void setUsername(String username) {
this.username = username;
}
项目:Enjin-Coin-Java-SDK
文件:Ethereum.java
/**
* mode to use.
* @return String
*/
@Value.Default
@SerializedName("mode")
public String getMode() {
return "geth_ipc";
}
项目:RxUploader
文件:UserJSONModel.java
@SerializedName("lastname")
public abstract String lastname();
项目:LiquidThings
文件:Main.java
@SerializedName("temp")
public abstract double currentTemp();