Home
last modified time | relevance | path

Searched refs:codeBlock (Results 1 – 25 of 37) sorted by relevance

12

/external/dagger2/java/dagger/internal/codegen/javapoet/
DExpression.java40 private final CodeBlock codeBlock; field in Expression
42 private Expression(TypeMirror type, CodeBlock codeBlock) { in Expression() argument
44 this.codeBlock = codeBlock; in Expression()
64 return create(newType, "($T) $L", newType, codeBlock); in castTo()
83 public CodeBlock codeBlock() { in codeBlock() method in Expression
84 return codeBlock; in codeBlock()
89 return String.format("[%s] %s", type, codeBlock); in toString()
DCodeBlocks.java92 TypeName.get(type), CodeBlock.of("return $L;", expression.codeBlock())); in anonymousProvider()
/external/dagger2/java/dagger/internal/codegen/
DFrameworkType.java89 CodeBlock codeBlock = to(requestKind, from.codeBlock()); in to() local
92 return Expression.create(types.unwrapTypeOrObject(from.type()), codeBlock); in to()
99 return Expression.create(types.wrapType(lazyType, Provider.class), codeBlock); in to()
103 types.rewrapType(from.type(), ListenableFuture.class), codeBlock); in to()
107 types.rewrapType(from.type(), RequestKinds.frameworkClass(requestKind)), codeBlock); in to()
148 to(requestKind, from.codeBlock())); in to()
151 return Expression.create(from.type(), to(requestKind, from.codeBlock())); in to()
DBindingExpression.java66 getDependencyExpressionForComponentMethod(componentMethod, component).codeBlock()); in getComponentMethodImplementation()
109 return CodeBlock.of("return $L;", dependencyExpression.codeBlock()); in getModifiableBindingMethodImplementation()
DImmediateFutureBindingExpression.java69 "($T) $L", types.accessibleType(key.type(), requestingClass), expression.codeBlock()); in instanceExpression()
72 return expression.codeBlock(); in instanceExpression()
DInjectionMethods.java381 CodeBlock.Builder codeBlock = CodeBlock.builder(); in injectionMethodArgument() local
386 codeBlock.add("($T) ($T)", usageTypeName, rawTypeName(usageTypeName)); in injectionMethodArgument()
388 codeBlock.add("($T)", keyType); in injectionMethodArgument()
391 return codeBlock.add(argument).build(); in injectionMethodArgument()
DOptionalFactoryInstanceCreationExpression.java58 .codeBlock()); in creationExpression()
DDelegatingFrameworkInstanceCreationExpression.java53 .codeBlock(), in creationExpression()
DProducerFromProviderCreationExpression.java53 .codeBlock()); in creationExpression()
DComponentMethodBindingExpression.java79 ? Expression.create(methodReturnType, expression.codeBlock()) in getDependencyExpression()
DMethodBindingExpression.java139 ::codeBlock); in methodBody()
148 ::codeBlock); in methodBodyForComponentMethod()
DComponentImplementation.java669 void addInitialization(CodeBlock codeBlock) { in addInitialization() argument
670 initializations.add(codeBlock); in addInitialization()
690 void addComponentRequirementInitialization(CodeBlock codeBlock) { in addComponentRequirementInitialization() argument
691 componentRequirementInitializations.add(codeBlock); in addComponentRequirementInitialization()
DOptionalBindingExpression.java75 .codeBlock(); in getDependencyExpression()
DMultibindingFactoryCreationExpression.java54 .codeBlock(); in multibindingDependencyExpression()
DProducerEntryPointView.java99 producerExpression.getDependencyExpression(component.name()).codeBlock()); in createField()
/external/javapoet/src/main/java/com/squareup/javapoet/
DCodeWriter.java134 public void emitComment(CodeBlock codeBlock) throws IOException { in emitComment() argument
138 emit(codeBlock); in emitComment()
214 public CodeWriter emit(CodeBlock codeBlock) throws IOException { in emit() argument
217 ListIterator<String> partIterator = codeBlock.formatParts.listIterator(); in emit()
222 emitLiteral(codeBlock.args.get(a++)); in emit()
226 emitAndIndent((String) codeBlock.args.get(a++)); in emit()
230 String string = (String) codeBlock.args.get(a++); in emit()
238 TypeName typeName = (TypeName) codeBlock.args.get(a++); in emit()
241 if (!codeBlock.formatParts.get(partIterator.nextIndex()).startsWith("$")) { in emit()
343 CodeBlock codeBlock = (CodeBlock) o; in emitLiteral() local
[all …]
DCodeBlock.java407 public Builder addStatement(CodeBlock codeBlock) {
408 return addStatement("$L", codeBlock);
411 public Builder add(CodeBlock codeBlock) {
412 formatParts.addAll(codeBlock.formatParts);
413 args.addAll(codeBlock.args);
442 CodeBlockJoiner add(CodeBlock codeBlock) {
448 builder.add(codeBlock);
DMethodSpec.java427 public Builder addCode(CodeBlock codeBlock) { in addCode() argument
428 code.add(codeBlock); in addCode()
441 public Builder defaultValue(CodeBlock codeBlock) { in defaultValue() argument
443 this.defaultValue = checkNotNull(codeBlock, "codeBlock == null"); in defaultValue()
484 public Builder addStatement(CodeBlock codeBlock) { in addStatement() argument
485 code.addStatement(codeBlock); in addStatement()
DAnnotationSpec.java99 for (CodeBlock codeBlock : values) { in emitAnnotationValues()
101 codeWriter.emit(codeBlock); in emitAnnotationValues()
205 public Builder addMember(String name, CodeBlock codeBlock) { in addMember() argument
209 values.add(codeBlock); in addMember()
DFieldSpec.java164 public Builder initializer(CodeBlock codeBlock) { in initializer() argument
166 this.initializer = checkNotNull(codeBlock, "codeBlock == null"); in initializer()
/external/dagger2/javatests/dagger/internal/codegen/javapoet/
DExpressionTest.java59 assertThat(castTo.codeBlock().toString()) in castTo()
72 assertThat(boxedExpression.codeBlock().toString()).isEqualTo("(java.lang.Integer) 5"); in box()
/external/javapoet/src/test/java/com/squareup/javapoet/
DCodeBlockTest.java284 CodeBlock codeBlock = CodeBlock.builder().add("$[$[").build(); in tooManyStatementEnters() local
287 codeBlock.toString(); in tooManyStatementEnters()
295 CodeBlock codeBlock = CodeBlock.builder().add("$]").build(); in statementExitWithoutStatementEnter() local
298 codeBlock.toString(); in statementExitWithoutStatementEnter()
/external/skqp/tools/bookmaker/
DmdOut.cpp1192 fIncludeParser.codeBlock(markType, name, fInProgress)); in addCodeBlock()
1621 string codeBlock = fIncludeParser.filteredBlock( in markTypeOut() local
1624 this->resolveOut(codeBlock.c_str(), codeBlock.c_str() + codeBlock.length(), in markTypeOut()
1637 string codeBlock = fIncludeParser.codeBlock(*grand, fInProgress); in markTypeOut() local
1638 this->resolveOut(codeBlock.c_str(), codeBlock.c_str() + codeBlock.length(), in markTypeOut()
1649 string codeBlock; in markTypeOut() local
1650 this->addCodeBlock(includeDef, codeBlock); in markTypeOut()
1651 this->resolveOut(codeBlock.c_str(), codeBlock.c_str() + codeBlock.length(), in markTypeOut()
DincludeWriter.cpp379 Definition* codeBlock = nullptr; in enumHeaderOut() local
387 codeBlock = test; in enumHeaderOut()
388 commentStart = codeBlock->fTerminator; in enumHeaderOut()
390 } else if (codeBlock) { in enumHeaderOut()
393 if (!codeBlock) { in enumHeaderOut()
444 SkASSERT(codeBlock); // FIXME: check enum for correct order earlier in enumHeaderOut()
1652 Definition* codeBlock = nullptr; in populate() local
1656 SkASSERT(!codeBlock); // FIXME: check enum earlier in populate()
1657 codeBlock = test; in populate()
1660 if (codeBlock) { in populate()
[all …]
DincludeParser.h120 string codeBlock(const Definition& def, bool inProgress) const { in codeBlock() function
121 return codeBlock(def.fMarkType, def.fName, inProgress); in codeBlock()
124 string codeBlock(MarkType markType, string name, bool inProgress) const { in codeBlock() function

12