public Field[] getEnumConstantFields() { if (null == enumConstantFields) { Enum<?>[] enums = (Enum<?>[]) reflectClass.getJavaClass().getEnumConstants(); enumConstantFields = new Field[enums.length]; for (int i = 0; i < enums.length; i++) { enumConstantFields[i] = reflectClass.getField(enums[i].name()).getJavaField(); } } return enumConstantFields; }
private void initialize() { this.valueField = reflectClass.getField(VALUE_FIELD_NAME); this.hasValueField = null != valueField; this.valueType = hasValueField ? valueField.getType() : null; }