mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 00:58:24 +08:00
fixed EnumWrapper.java
This commit is contained in:
parent
ab2646f377
commit
0485ec2609
@ -67,7 +67,7 @@ public class ClassUtil {
|
||||
}
|
||||
|
||||
|
||||
public static Class<?> wrap(Class<?> clazz) {
|
||||
public static Class<?> getWrapType(Class<?> clazz) {
|
||||
if (clazz == null || !clazz.isPrimitive()) {
|
||||
return clazz;
|
||||
}
|
||||
|
||||
@ -57,10 +57,10 @@ public class EnumWrapper<E extends Enum<E>> {
|
||||
return methodName.equals(fieldGetterName) && Modifier.isPublic(method.getModifiers());
|
||||
});
|
||||
|
||||
enumPropertyType = ClassUtil.wrap(enumValueField.getType());
|
||||
enumPropertyType = ClassUtil.getWrapType(enumValueField.getType());
|
||||
enums = enumClass.getEnumConstants();
|
||||
|
||||
if (getterMethod != null) {
|
||||
if (getterMethod == null) {
|
||||
if (Modifier.isPublic(enumValueField.getModifiers())) {
|
||||
property = enumValueField;
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user