public final class TestComponentDataGenerator
extends java.lang.Object
dagger.hilt.android.internal.TestComponentData.| Constructor and Description |
|---|
TestComponentDataGenerator(javax.annotation.processing.ProcessingEnvironment processingEnv,
RootMetadata rootMetadata) |
| Modifier and Type | Method and Description |
|---|---|
void |
generate()
|
public TestComponentDataGenerator(javax.annotation.processing.ProcessingEnvironment processingEnv,
RootMetadata rootMetadata)
public void generate()
throws java.io.IOException
public final class FooTest_ComponentDataHolder {
public static TestComponentData get() {
return new TestComponentData(
false, // waitForBindValue
testInstance -> injectInternal(($1T) testInstance),
Arrays.asList(FooTest.TestModule.class, ...),
modules ->
DaggerFooTest_ApplicationComponent.builder()
.applicationContextModule(
new ApplicationContextModule(ApplicationProvider.getApplicationContext()))
.testModule((FooTest.TestModule) modules.get(FooTest.TestModule.class))
.testModule(modules.containsKey(FooTest.TestModule.class)
? (FooTest.TestModule) modules.get(FooTest.TestModule.class)
: ((TestInstace) testInstance).new TestModule())
.build());
}
}
java.io.IOException