eclipse / jnosql

Eclipse JNoSQL is a framework which has the goal to help Java developers to create Jakarta EE applications with NoSQL.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Integrating Support for Default Methods in Repository Interfaces with CDI Lite

otaviojava opened this issue · comments

Which JNoSQL project the issue refers to?

JNoSQL Extensions

Use case

The objective is to enhance CDI Lite, enabling it to recognize and appropriately handle default methods defined in Repository interfaces. Traditionally, CDI requires explicit bean definitions or implementations for methods within interfaces. However, with the growing use of default methods in interfaces for shared or standard functionality, there's a need for CDI Lite to adapt by allowing these default methods to be skipped in proxy or implementation generation processes, provided they already have an implementation within the interface.

Feature proposal

This feature aims to streamline the development process, reducing boilerplate code and making it easier for developers to leverage modern Java interface capabilities. By acknowledging default methods in Repository interfaces, CDI Lite can focus on managing dependencies for methods without default implementations, thus enhancing its support for modular and clean codebases. Implementing this feature would involve modifying the CDI Lite container's processing logic to detect and ignore default methods during the bean discovery and proxy generation phases. This update would follow Java's evolution and encourage best practices in code reusability and architecture within the CDI community.