class ClassConverter {

    public ClassMapping create(Class<?> entityClass) {

        long start = System.currentTimeMillis();
        String entityName = reflections.getEntityName(entityClass);

        List<FieldMapping> fields = reflections.getFields(entityClass)
                .stream().map(this::to).collect(toList());

        List<String> fieldsName = fields.stream().map(FieldMapping::getName).collect(toList());

        Map<String, NativeMapping> nativeFieldGroupByJavaField =
                getNativeFieldGroupByJavaField(fields, "", "");

        Map<String, FieldMapping> fieldsGroupedByName = fields.stream()
                .collect(collectingAndThen(toMap(FieldMapping::getName,
                        Function.identity()), Collections::unmodifiableMap));

        InstanceSupplier instanceSupplier = instanceSupplierFactory.apply(reflections.makeAccessible(entityClass));

        ClassMapping mapping = DefaultClassMapping.builder().withName(entityName)
                .withClassInstance(entityClass)
                .withFields(fields)
                .withFieldsName(fieldsName)
                .withInstanceSupplier(instanceSupplier)
                .withJavaFieldGroupedByColumn(nativeFieldGroupByJavaField)
                .withFieldsGroupedByName(fieldsGroupedByName)
                .build();

        long end = System.currentTimeMillis() - start;
        LOGGER.info(String.format("Scanned %s loaded with time %d ms", entityClass.getName(), end));
        return mapping;
    }

    @Inject  ClassConverter(Reflections reflections);
      ClassConverter();

}