EnumSimpledCoder

This commit is contained in:
redkale
2024-09-29 14:46:51 +08:00
parent b724ce1a0c
commit 0b10009d5e

View File

@@ -43,7 +43,7 @@ public final class EnumSimpledCoder<R extends Reader, W extends Writer, E extend
char[] chs = fieldName.toCharArray();
chs[0] = Character.toUpperCase(chs[0]);
String methodName = "get" + new String(chs);
Method method = null;
Method method;
try {
method = type.getMethod(methodName);
} catch (NoSuchMethodException | SecurityException me) {
@@ -92,7 +92,7 @@ public final class EnumSimpledCoder<R extends Reader, W extends Writer, E extend
}
@Override
public Class<E> getType() {
return (Class<E>) type;
public Type getType() {
return type;
}
}