Home
last modified time | relevance | path

Searched refs:addSnippet (Results 1 – 9 of 9) sorted by relevance

/external/dagger2/compiler/src/main/java/dagger/internal/codegen/
DFactoryGenerator.java142 .addSnippet("assert module != null;") in write()
143 .addSnippet("this.module = module;"); in write()
165 .addSnippet("assert membersInjector != null;") in write()
166 .addSnippet("this.membersInjector = membersInjector;"); in write()
179 .addSnippet("assert %s != null;", field.name()) in write()
180 .addSnippet("this.%1$s = %1$s;", field.name()); in write()
204 createMethodWriter.body().addSnippet("return INSTANCE;"); in write()
209 createMethodWriter.body().addSnippet("return (Factory) INSTANCE;"); in write()
213 createMethodWriter.body().addSnippet("return new %s(%s);", in write()
243 getMethodWriter.body().addSnippet("return %s.<%s>singleton(%s);", in write()
[all …]
DSubcomponentWriter.java149 componentMethod.body().addSnippet("return new %s();", builderName.get()); in addFactoryMethods()
180 .addSnippet("if (%s == null) {", actualModuleName) in writeSubcomponentWithoutBuilder()
181 .addSnippet(" throw new NullPointerException();") in writeSubcomponentWithoutBuilder()
182 .addSnippet("}"); in writeSubcomponentWithoutBuilder()
183 constructorWriter.body().addSnippet("this.%1$s = %1$s;", actualModuleName); in writeSubcomponentWithoutBuilder()
200 constructorWriter.body().addSnippet("this.%s = new %s();", in writeSubcomponentWithoutBuilder()
207 componentMethod.body().addSnippet("return new %s(%s);", in writeSubcomponentWithoutBuilder()
DAbstractComponentWriter.java208 .addSnippet( in getOrCreateComponentContributionFieldSnippet()
303 constructorWriter.body().addSnippet("assert builder != null;"); in addBuilder()
342 .addSnippet("if (%1$s == null) { this.%1$s = new %2$s(); }", in addBuildMethod()
347 .addSnippet( in addBuildMethod()
355 buildMethod.body().addSnippet("return new %s(this);", name); in addBuildMethod()
374 builderMethod.body().addSnippet(nullCheck(parameterName)); in addBuilderMethods()
377 builderMethod.body().addSnippet("this.%s = %s;", in addBuilderMethods()
384 .addSnippet("// This module is declared, but not used in the component. " in addBuilderMethods()
391 .addSnippet( in addBuilderMethods()
408 builderMethod.body().addSnippet(nullCheck(componentRequirementName)); in addBuilderMethods()
[all …]
DProducerFactoryGenerator.java114 .addSnippet( in write()
125 .addSnippet("assert module != null;") in write()
126 .addSnippet("this.module = module;"); in write()
133 .addSnippet("assert executor != null;") in write()
134 .addSnippet("this.executor = executor;"); in write()
153 .addSnippet("assert %s != null;", field.name()) in write()
154 .addSnippet("this.%1$s = %1$s;", field.name()); in write()
178 .addSnippet( in write()
213 .addSnippet( in write()
DMembersInjectorGenerator.java143 injectMembersWriter.body().addSnippet(Joiner.on('\n').join(
195 constructorWriter.body().addSnippet("assert %s != null;", field.name());
196 constructorWriter.body().addSnippet("this.%1$s = %1$s;", field.name());
202 .addSnippet(
211 .addSnippet(
340 .addSnippet(
347 .addSnippet(
DComponentWriter.java81 builderFactoryMethod.body().addSnippet("return new %s();", builderWriter.name()); in createBuilder()
94 .addSnippet( in addFactoryMethods()
DMonitoringModuleGenerator.java83 .addSnippet("return %s.of();", ClassName.fromClass(ImmutableSet.class)); in write()
95 monitorMethod.body().addSnippet("return monitorCache.monitor(component, factories);"); in write()
DMapKeyGenerator.java147 createMethod.body().addSnippet( in writeCreateMethod()
/external/dagger2/compiler/src/main/java/dagger/internal/codegen/writer/
DBlockWriter.java32 public BlockWriter addSnippet(String snippet, Object... args) { in addSnippet() method in BlockWriter
37 public BlockWriter addSnippet(Snippet snippet) { in addSnippet() method in BlockWriter