ValueType () { final String fieldName = myField.getName(); Class<?> fieldType = myField.getType(); String name = fieldType.getName(); if (fieldType.isPrimitive()) { if ("int".equals(name)) { WrapConstant wrapAnnotation = myField.getAnnotation(WrapConstant.class); if (wrapAnnotation != null) { return ValueType.WRAP; } BraceStyleConstant braceAnnotation = myField.getAnnotation(BraceStyleConstant.class); if (braceAnnotation != null) { return ValueType.BRACE_STYLE; } else if (fieldName.endsWith("_BRACE_FORCE")) { return ValueType.FORCE_BRACES; } return ValueType.INT; } else if ("boolean".equals(name)) { return ValueType.BOOLEAN; } } else if ("java.lang.String".equals(name)) { return ValueType.STRING; } else if (fieldType.isEnum()) { return ValueType.ENUM; } return ValueType.OTHER; }