1
1
package io .avaje .inject .generator ;
2
2
3
+ import static io .avaje .inject .generator .ProcessingContext .logDebug ;
4
+ import static io .avaje .inject .generator .ProcessingContext .logWarn ;
5
+
3
6
import java .util .Iterator ;
4
7
import java .util .ServiceConfigurationError ;
5
8
import java .util .ServiceLoader ;
@@ -30,13 +33,17 @@ private static boolean moduleCP() {
30
33
31
34
static void registerModuleProvidedTypes (Set <String > providedTypes ) {
32
35
if (!injectAvailable ) {
36
+ logWarn (
37
+ "Unable to detect Avaje Inject in Annotation Processor Class Path, use the Avaje Inject Maven/Gradle plugin for detecting external dependencies" );
33
38
return ;
34
39
}
35
40
36
- Iterator <Module > iterator = ServiceLoader .load (Module .class , ExternalProvider .class .getClassLoader ()).iterator ();
41
+ Iterator <Module > iterator =
42
+ ServiceLoader .load (Module .class , ExternalProvider .class .getClassLoader ()).iterator ();
37
43
while (iterator .hasNext ()) {
38
44
try {
39
- Module module = iterator .next ();
45
+ var module = iterator .next ();
46
+ logDebug ("Loaded External Module %s" , module .getClass ().getCanonicalName ());
40
47
for (final Class <?> provide : module .provides ()) {
41
48
providedTypes .add (provide .getCanonicalName ());
42
49
}
@@ -61,6 +68,7 @@ static void registerPluginProvidedTypes(ScopeInfo defaultScope) {
61
68
return ;
62
69
}
63
70
for (final Plugin plugin : ServiceLoader .load (Plugin .class , Processor .class .getClassLoader ())) {
71
+ logDebug ("Loaded Plugin %s" , plugin .getClass ().getCanonicalName ());
64
72
for (final Class <?> provide : plugin .provides ()) {
65
73
defaultScope .pluginProvided (provide .getCanonicalName ());
66
74
}
0 commit comments