All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.univapay.sdk.utils.EnumConverterUtils Maven / Gradle / Ivy

The newest version!
package com.univapay.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;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy