Closed
Description
If you wanna map the enum which contains an abstract method :
Map<String, ?> conversionResult = beanMapper.map(convertedBean, Map.class);
where the bean is:
public class ConvertedBean {
private ConvertedEnum enum;
// getters & setters
}
and the enum is:
public enum ConvertedEnum {
SUCCESSFUL {
@Override
public boolean isOverallStatus(Set<SomeType> stats) {
return EnumSet.of(SomeType.SUCCESSFUL, SomeType.EXCLUDED).containsAll(stats);
}
};
public abstract boolean isOverallStatus(Set<SomeType> stats);
}
And when we want to map it, this causes:
java.lang.IllegalArgumentException: package.ConvertedEnum$1 is not an enum type.
Probably the reason is that in some place after getClass() invocation should be use also getDeclaringType() method.