io.vertx.up.uca.serialization.EnumSaber Maven / Gradle / Ivy
package io.vertx.up.uca.serialization;
import io.vertx.up.fn.Fn;
import io.vertx.up.util.Ut;
/**
* Enum
*/
public class EnumSaber extends BaseSaber {
@Override
public Object from(final T input) {
return Fn.getNull(() -> {
Object reference = null;
if (input instanceof Enum) {
reference = Ut.invoke(input, "name");
}
return reference;
}, input);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy