I have 2 packages , A and B which contain the same list of classes. I am not able to use dozer or any mapping tool directly because the Enum values are uppercase in one package and camelcase in another package. I want to write a generic method which takes in the enum from package A and convert it into enum in package B using Reflection. Below is the specific code that I had written -
return a.CardType.valueOf(((b.CardType)source).getValue().toUpperCase());
I want to write generic code to convert assuming I have source class ( enum type) as object , source class name and destination class name