class EnumTypeDefinitionBuilder implements DeclaredTypeDefinitionBuilder {

    @Override
    public void build(ProcessingEnvironment processingEnv, DeclaredType type, TypeDefinition typeDefinition) {
        getDeclaredFields(type, FieldUtils::isEnumMemberField)
                .stream()
                .map(Element::getSimpleName)
                .map(Name::toString)
                .forEach(typeDefinition.getEnums()::add);
    }

}