org.cloudfoundry.multiapps.controller.process.variables.EnumVariable Maven / Gradle / Ivy
package org.cloudfoundry.multiapps.controller.process.variables;
import org.flowable.common.engine.api.variable.VariableContainer;
import org.immutables.value.Value;
@Value.Immutable
public abstract class EnumVariable> implements Variable {
public abstract Class getType();
@Override
public Serializer getSerializer() {
return new Serializer() {
@Override
public Object serialize(T value) {
return value.toString();
}
@Override
public T deserialize(Object serializedValue) {
return Enum.valueOf(getType(), (String) serializedValue);
}
@Override
public T deserialize(Object serializedValue, VariableContainer container) {
return deserialize(serializedValue);
}
};
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy