If the values ββare constant, it is better and you do not need to serialize anything
public enum ExecutionMode { TYPE_A(x,t), TYPE_B(y,z), TYPE_C(b,s) private boolean incremental;
If you set these values ββat runtime, my tendency will be that this should not be an enumeration in the first place - there should be a separate POJO, which may contain values, as well as a link to the enumeration value.
source share