File tree 1 file changed +10
-5
lines changed
java/dagger/hilt/android/processor/internal/androidentrypoint
1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change 29
29
import androidx .room .compiler .processing .XTypeElement ;
30
30
import androidx .room .compiler .processing .XTypeParameterElement ;
31
31
import com .google .common .collect .ImmutableSet ;
32
- import com .squareup .javapoet .ClassName ;
33
- import com .squareup .javapoet .JavaFile ;
34
- import com .squareup .javapoet .MethodSpec ;
35
- import com .squareup .javapoet .ParameterSpec ;
36
- import com .squareup .javapoet .TypeSpec ;
32
+ import com .squareup .javapoet .*;
37
33
import dagger .hilt .android .processor .internal .AndroidClassNames ;
38
34
import dagger .hilt .processor .internal .ClassNames ;
39
35
import dagger .hilt .processor .internal .Processors ;
@@ -73,6 +69,15 @@ public void generate() throws IOException {
73
69
// onReceive call is implemented in any of the super classes.
74
70
if (metadata .requiresBytecodeInjection () && !isOnReceiveImplemented (metadata .baseElement ())) {
75
71
builder .addAnnotation (ClassNames .ON_RECEIVE_BYTECODE_INJECTION_MARKER );
72
+
73
+ builder .addField (
74
+ FieldSpec .builder (
75
+ TypeName .BOOLEAN ,
76
+ "onReceiveBytecodeInjectionMarker" ,
77
+ Modifier .PRIVATE ,
78
+ Modifier .FINAL )
79
+ .initializer ("false" )
80
+ .build ());
76
81
}
77
82
78
83
JavaPoetExtKt .addOriginatingElement (builder , metadata .element ());
You can’t perform that action at this time.
0 commit comments