Home
last modified time | relevance | path

Searched refs:codeBlock (Results 1 – 25 of 38) 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()
/external/dagger2/java/dagger/internal/codegen/binding/
DFrameworkType.java90 CodeBlock codeBlock = to(requestKind, from.codeBlock()); in to() local
93 return Expression.create(types.unwrapTypeOrObject(from.type()), codeBlock); in to()
100 return Expression.create(types.wrapType(lazyType, Provider.class), codeBlock); in to()
104 types.rewrapType(from.type(), ListenableFuture.class), codeBlock); in to()
108 types.rewrapType(from.type(), RequestKinds.frameworkClass(requestKind)), codeBlock); in to()
149 to(requestKind, from.codeBlock())); in to()
152 return Expression.create(from.type(), to(requestKind, from.codeBlock())); in to()
/external/javapoet/src/main/java/com/squareup/javapoet/
DCodeWriter.java140 public void emitComment(CodeBlock codeBlock) throws IOException { in emitComment() argument
144 emit(codeBlock); in emitComment()
226 public CodeWriter emit(CodeBlock codeBlock) throws IOException { in emit() argument
227 return emit(codeBlock, false); in emit()
230 public CodeWriter emit(CodeBlock codeBlock, boolean ensureTrailingNewline) throws IOException { in emit() argument
233 ListIterator<String> partIterator = codeBlock.formatParts.listIterator(); in emit()
238 emitLiteral(codeBlock.args.get(a++)); in emit()
242 emitAndIndent((String) codeBlock.args.get(a++)); in emit()
246 String string = (String) codeBlock.args.get(a++); in emit()
254 TypeName typeName = (TypeName) codeBlock.args.get(a++); in emit()
[all …]
DMethodSpec.java448 public Builder addCode(CodeBlock codeBlock) { in addCode() argument
449 code.add(codeBlock); in addCode()
462 public Builder defaultValue(CodeBlock codeBlock) { in defaultValue() argument
464 this.defaultValue = checkNotNull(codeBlock, "codeBlock == null"); in defaultValue()
481 public Builder beginControlFlow(CodeBlock codeBlock) { in beginControlFlow() argument
482 return beginControlFlow("$L", codeBlock); in beginControlFlow()
498 public Builder nextControlFlow(CodeBlock codeBlock) { in nextControlFlow() argument
499 return nextControlFlow("$L", codeBlock); in nextControlFlow()
520 public Builder endControlFlow(CodeBlock codeBlock) { in endControlFlow() argument
521 return endControlFlow("$L", codeBlock); in endControlFlow()
[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);
448 CodeBlockJoiner add(CodeBlock codeBlock) {
454 builder.add(codeBlock);
DAnnotationSpec.java99 for (CodeBlock codeBlock : values) { in emitAnnotationValues()
101 codeWriter.emit(codeBlock); in emitAnnotationValues()
206 public Builder addMember(String name, CodeBlock codeBlock) { in addMember() argument
208 values.add(codeBlock); in addMember()
DFieldSpec.java165 public Builder initializer(CodeBlock codeBlock) { in initializer() argument
167 this.initializer = checkNotNull(codeBlock, "codeBlock == null"); in initializer()
/external/dagger2/java/dagger/internal/codegen/writing/
DImmediateFutureBindingExpression.java68 "($T) $L", types.accessibleType(key.type(), requestingClass), expression.codeBlock()); in instanceExpression()
71 return expression.codeBlock(); in instanceExpression()
DComponentImplementation.java328 void addInitialization(CodeBlock codeBlock) { in addInitialization() argument
329 initializations.add(codeBlock); in addInitialization()
333 void addComponentRequirementInitialization(CodeBlock codeBlock) { in addComponentRequirementInitialization() argument
334 componentRequirementInitializations.add(codeBlock); in addComponentRequirementInitialization()
DBindingExpression.java61 getDependencyExpressionForComponentMethod(componentMethod, component).codeBlock()); in getComponentMethodImplementation()
DOptionalFactoryInstanceCreationExpression.java59 .codeBlock()); in creationExpression()
DDelegatingFrameworkInstanceCreationExpression.java54 .codeBlock(), in creationExpression()
DSimpleMethodBindingExpression.java98 request -> dependencyArgument(request, requestingClass).codeBlock(), in invokeMethod()
141 request -> dependencyArgument(request, requestingClass).codeBlock(), in invokeInjectionMethod()
DMultibindingFactoryCreationExpression.java51 .codeBlock(); in multibindingDependencyExpression()
DProducerFromProviderCreationExpression.java55 .codeBlock()); in creationExpression()
DInjectionMethods.java377 CodeBlock.Builder codeBlock = CodeBlock.builder(); in injectionMethodArgument() local
382 codeBlock.add("($T) ($T)", usageTypeName, rawTypeName(usageTypeName)); in injectionMethodArgument()
384 codeBlock.add("($T)", keyType); in injectionMethodArgument()
387 return codeBlock.add(argument).build(); in injectionMethodArgument()
DComponentMethodBindingExpression.java81 ? Expression.create(methodReturnType, expression.codeBlock()) in getDependencyExpression()
DMethodBindingExpression.java120 ::codeBlock); in methodBody()
129 ::codeBlock); in methodBodyForComponentMethod()
DProducerEntryPointView.java99 producerExpression.getDependencyExpression(component.name()).codeBlock()); in createField()
DOptionalBindingExpression.java77 .codeBlock(); in getDependencyExpression()
/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