001package io.avaje.inject.spi; 002 003/** A Module containing dependencies that will be included in BeanScope. */ 004public interface AvajeModule extends InjectExtension { 005 006 /** Empty array of strings. */ 007 String[] EMPTY_STRINGS = {}; 008 009 /** 010 * Return public classes of the beans that would be registered by this module. 011 * 012 * <p>This method allows code to use reflection to inspect the modules classes before the module 013 * is wired. This method is not required for DI wiring. 014 */ 015 Class<?>[] classes(); 016 017 /** Build all the beans. */ 018 void build(Builder builder); 019 020 /** Return the type names of types this module explicitly provides to other modules. */ 021 default String[] providesBeans() { 022 return EMPTY_STRINGS; 023 } 024 025 /** 026 * Return the type(s) of scopes that this module provides 027 */ 028 default String[] definesScopes() { 029 return EMPTY_STRINGS; 030 } 031 032 /** 033 * Return the type names of types this module needs to be provided externally or via other 034 * modules. 035 */ 036 default String[] requiresBeans() { 037 return EMPTY_STRINGS; 038 } 039 040 /** Return the type names of packages this module needs to be provided via other modules. */ 041 default String[] requiresPackagesFromType() { 042 return EMPTY_STRINGS; 043 } 044 045 /** Marker for custom scoped modules. */ 046 interface Custom extends AvajeModule {} 047}