Home
last modified time | relevance | path

Searched refs:constructorWriter (Results 1 – 7 of 7) sorted by relevance

/external/dagger2/compiler/src/main/java/dagger/internal/codegen/writer/
DClassWriter.java71 ConstructorWriter constructorWriter = new ConstructorWriter(name.simpleName()); in addConstructor() local
72 constructorWriters.add(constructorWriter); in addConstructor()
73 return constructorWriter; in addConstructor()
112 for (ConstructorWriter constructorWriter : constructorWriters) { in write()
114 if (!isDefaultConstructor(constructorWriter)) { in write()
115 constructorWriter.write(new IndentingAppendable(appendable), context); in write()
133 private boolean isDefaultConstructor(ConstructorWriter constructorWriter) { in isDefaultConstructor() argument
135 .equals(Sets.intersection(VISIBILIY_MODIFIERS, constructorWriter.modifiers)) in isDefaultConstructor()
136 && constructorWriter.body().isEmpty(); in isDefaultConstructor()
DEnumWriter.java51 ConstructorWriter constructorWriter = new ConstructorWriter(name.simpleName()); in addConstructor() local
52 constructorWriters.add(constructorWriter); in addConstructor()
53 return constructorWriter; in addConstructor()
96 for (ConstructorWriter constructorWriter : constructorWriters) { in write()
98 if (!isDefaultConstructor(constructorWriter)) { in write()
99 constructorWriter.write(new IndentingAppendable(appendable), context); in write()
117 private boolean isDefaultConstructor(ConstructorWriter constructorWriter) { in isDefaultConstructor() argument
119 .equals(Sets.intersection(VISIBILIY_MODIFIERS, constructorWriter.modifiers)) in isDefaultConstructor()
120 && constructorWriter.body().isEmpty(); in isDefaultConstructor()
/external/dagger2/compiler/src/main/java/dagger/internal/codegen/
DFactoryGenerator.java111 final Optional<ConstructorWriter> constructorWriter; in write() local
120 constructorWriter = Optional.absent(); in write()
133 constructorWriter = Optional.of(classWriter.addConstructor()); in write()
134 constructorWriter.get().addModifiers(PUBLIC); in write()
140 constructorWriter.get().addParameter(enclosingType, "module"); in write()
141 constructorWriter.get().body() in write()
163 constructorWriter.get().addParameter(membersInjectorType, "membersInjector"); in write()
164 constructorWriter.get().body() in write()
177 constructorWriter.get().addParameter(field.type(), field.name()); in write()
178 constructorWriter.get().body() in write()
[all …]
DProducerFactoryGenerator.java105 ConstructorWriter constructorWriter = factoryWriter.addConstructor(); in write() local
106 constructorWriter.addModifiers(PUBLIC); in write()
112 constructorWriter in write()
123 constructorWriter.addParameter(binding.bindingTypeElement(), "module"); in write()
124 constructorWriter.body() in write()
131 constructorWriter.addParameter(Executor.class, "executor"); in write()
132 constructorWriter.body() in write()
151 constructorWriter.addParameter(field.type(), field.name()); in write()
152 constructorWriter.body() in write()
DMembersInjectorGenerator.java137 ConstructorWriter constructorWriter = injectorWriter.addConstructor();
138 constructorWriter.addModifiers(PUBLIC);
181 constructorWriter.addParameter(field.type(), field.name());
195 constructorWriter.body().addSnippet("assert %s != null;", field.name());
196 constructorWriter.body().addSnippet("this.%1$s = %1$s;", field.name());
205 Joiner.on(", ").join(constructorWriter.parameters().keySet()));
DSubcomponentWriter.java178 constructorWriter.addParameter(moduleType, actualModuleName); in writeSubcomponentWithoutBuilder()
179 constructorWriter.body() in writeSubcomponentWithoutBuilder()
183 constructorWriter.body().addSnippet("this.%1$s = %1$s;", actualModuleName); in writeSubcomponentWithoutBuilder()
200 constructorWriter.body().addSnippet("this.%s = new %s();", in writeSubcomponentWithoutBuilder()
DAbstractComponentWriter.java138 protected ConstructorWriter constructorWriter; field in AbstractComponentWriter
206 constructorWriter in getOrCreateComponentContributionFieldSnippet()
277 constructorWriter = componentWriter.addConstructor(); in addConstructor()
278 constructorWriter.addModifiers(PRIVATE); in addConstructor()
302 constructorWriter.addParameter(builderWriter, "builder"); in addBuilder()
303 constructorWriter.body().addSnippet("assert builder != null;"); in addBuilder()
700 constructorWriter.body().addSnippet("%s(builder);", initializeMethod.name()); in initializeFrameworkTypes()
702 constructorWriter.body().addSnippet("%s();", initializeMethod.name()); in initializeFrameworkTypes()