cdc.util.enums.DynamicEnumToString Maven / Gradle / Ivy
package cdc.util.enums;
import cdc.util.args.Args;
import cdc.util.args.Factory;
import cdc.util.converters.AbstractConverter;
import cdc.util.converters.Converter;
public class DynamicEnumToString extends AbstractConverter {
public static final DynamicEnumToString INSTANCE = new DynamicEnumToString();
public static final Factory FACTORY = Converter.singleton(INSTANCE);
private DynamicEnumToString() {
super(DynamicEnum.class,
String.class);
}
@Override
public String apply(DynamicEnum source) {
return source == null ? null : source.getQName();
}
@Override
public Args getParams() {
return Args.NO_ARGS;
}
}