jp.gopay.sdk.utils.EnumConverterUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gopay-java-sdk Show documentation
Show all versions of gopay-java-sdk Show documentation
Official Gyro-n Payments Java SDK
package jp.gopay.sdk.utils;
import com.google.gson.annotations.SerializedName;
public class EnumConverterUtils {
public static > String getSerializedValue(E e) {
String value = null;
try {
value = e.getClass().getField(e.name()).getAnnotation(SerializedName.class).value();
} catch (NoSuchFieldException exception) {
exception.printStackTrace();
}
return value;
}
}