// Check for type-safe enum style classes
if ((fieldType != null) && !isPrimitive(fieldType)) {
if (!hasPublicDefaultConstructor(fieldType)) {
Method method = getStaticValueOfMethod(fieldType);
if (method != null) {
handler = new EnumFieldHandler(fieldType, handler, method);
typeInfo.setImmutable(true);
isTypeSafeEnum = true;
}
}
}