Home
last modified time | relevance | path

Searched refs:CodeBlock (Results 1 – 18 of 18) sorted by relevance

/external/javapoet/src/test/java/com/squareup/javapoet/
DCodeBlockTest.java31 CodeBlock a = CodeBlock.builder().build(); in equalsAndHashCode()
32 CodeBlock b = CodeBlock.builder().build(); in equalsAndHashCode()
35 a = CodeBlock.builder().add("$L", "taco").build(); in equalsAndHashCode()
36 b = CodeBlock.builder().add("$L", "taco").build(); in equalsAndHashCode()
42 CodeBlock a = CodeBlock.of("$L taco", "delicious"); in of()
47 assertTrue(CodeBlock.builder().isEmpty()); in isEmpty()
48 assertTrue(CodeBlock.builder().add("").isEmpty()); in isEmpty()
49 assertFalse(CodeBlock.builder().add(" ").isEmpty()); in isEmpty()
54 CodeBlock.builder().add("$1>", "taco").build(); in indentCannotBeIndexed()
65 CodeBlock.builder().add("$1<", "taco").build(); in deindentCannotBeIndexed()
[all …]
DTypeSpecTest.java125 TypeSpec aSimpleThung = TypeSpec.anonymousClassBuilder(CodeBlock.of("$N", thungParameter)) in anonymousInnerClass()
856 .addCode(CodeBlock.builder().addStatement("return 0").build()) in classCannotHaveDefaultMethods()
870 .addCode(CodeBlock.builder().addStatement("return 0").build()) in interfaceStaticMethods()
891 .addCode(CodeBlock.builder().addStatement("return 0").build()) in interfaceDefaultMethods()
1038 .addJavadoc(CodeBlock.of("and some {@link $T} cheese.\n", String.class)) in javadoc()
1129 CodeBlock ifBlock = CodeBlock.builder() in codeBlocks()
1134 CodeBlock methodBody = CodeBlock.builder() in codeBlocks()
1143 CodeBlock fieldBlock = CodeBlock.builder() in codeBlocks()
1417 .addCode(CodeBlock.builder() in nativeMethods()
1464 CodeBlock codeBlock = CodeBlock.builder() in codeBlockToString()
[all …]
DJavaFileTest.java81 .addStaticBlock(CodeBlock.builder() in importStaticForCrazyFormatsWorks()
104 .addStaticBlock(CodeBlock.builder() in importStaticMixed()
/external/javapoet/src/main/java/com/squareup/javapoet/
DCodeBlock.java65 public final class CodeBlock { class
74 private CodeBlock(Builder builder) { in CodeBlock() method in CodeBlock
104 public static CodeBlock of(String format, Object... args) { in of()
113 public static CodeBlock join(Iterable<CodeBlock> codeBlocks, String separator) { in join()
122 public static Collector<CodeBlock, ?, CodeBlock> joining(String separator) { in joining()
135 public static Collector<CodeBlock, ?, CodeBlock> joining( in joining()
143 builder.add(CodeBlock.of("$N", suffix)); in joining()
407 public Builder addStatement(CodeBlock codeBlock) {
411 public Builder add(CodeBlock codeBlock) {
427 public CodeBlock build() {
[all …]
DFieldSpec.java35 public final CodeBlock javadoc;
38 public final CodeBlock initializer;
47 ? CodeBlock.builder().build() in FieldSpec()
113 private final CodeBlock.Builder javadoc = CodeBlock.builder();
116 private CodeBlock initializer = null;
128 public Builder addJavadoc(CodeBlock block) { in addJavadoc()
161 return initializer(CodeBlock.of(format, args)); in initializer()
164 public Builder initializer(CodeBlock codeBlock) { in initializer()
DAnnotationSpec.java46 public final Map<String, List<CodeBlock>> members;
75 for (Iterator<Map.Entry<String, List<CodeBlock>>> i in emit()
77 Map.Entry<String, List<CodeBlock>> entry = i.next(); in emit()
88 String memberSeparator, List<CodeBlock> values) throws IOException { in emitAnnotationValues()
99 for (CodeBlock codeBlock : values) { in emitAnnotationValues()
165 for (Map.Entry<String, List<CodeBlock>> entry : members.entrySet()) { in toBuilder()
195 private final Map<String, List<CodeBlock>> members = new LinkedHashMap<>();
202 return addMember(name, CodeBlock.of(format, args)); in addMember()
205 public Builder addMember(String name, CodeBlock codeBlock) { in addMember()
208 List<CodeBlock> values = members.computeIfAbsent(name, k -> new ArrayList<>()); in addMember()
DMethodSpec.java47 public final CodeBlock javadoc;
55 public final CodeBlock code;
56 public final CodeBlock defaultValue;
59 CodeBlock code = builder.code.build(); in MethodSpec()
282 private final CodeBlock.Builder javadoc = CodeBlock.builder();
289 private final CodeBlock.Builder code = CodeBlock.builder();
291 private CodeBlock defaultValue;
306 public Builder addJavadoc(CodeBlock block) { in addJavadoc()
427 public Builder addCode(CodeBlock codeBlock) { in addCode()
438 return defaultValue(CodeBlock.of(format, args)); in defaultValue()
[all …]
DTypeSpec.java43 public final CodeBlock anonymousTypeArguments;
44 public final CodeBlock javadoc;
52 public final CodeBlock staticBlock;
53 public final CodeBlock initializerBlock;
136 return anonymousClassBuilder(CodeBlock.builder() in anonymousClassBuilder()
141 public static Builder anonymousClassBuilder(CodeBlock typeArguments) { in anonymousClassBuilder()
395 private final CodeBlock anonymousTypeArguments;
397 private final CodeBlock.Builder javadoc = CodeBlock.builder();
405 private final CodeBlock.Builder staticBlock = CodeBlock.builder();
406 private final CodeBlock.Builder initializerBlock = CodeBlock.builder();
[all …]
DCodeWriter.java134 public void emitComment(CodeBlock codeBlock) throws IOException { in emitComment()
145 public void emitJavadoc(CodeBlock javadocCodeBlock) throws IOException { in emitJavadoc()
211 return emit(CodeBlock.of(format, args)); in emit()
214 public CodeWriter emit(CodeBlock codeBlock) throws IOException { in emit()
342 } else if (o instanceof CodeBlock) { in emitLiteral()
343 CodeBlock codeBlock = (CodeBlock) o; in emitLiteral()
DJavaFile.java57 public final CodeBlock fileComment;
218 private final CodeBlock.Builder fileComment = CodeBlock.builder();
/external/javapoet/
DCHANGELOG.md25 * New: `CodeBlock.join()` and `CodeBlock.joining()` let you join codeblocks by delimiters.
26 * New: Add `CodeBlock.Builder.isEmpty()`.
27 * New: `addStatement(CodeBlock)` overloads for `CodeBlock` and `MethodSpec`.
39 * New: `MethodSpec.Builder.addNamedCode()` and `TypeSpec.anonymousClassBuilder(CodeBlock)`.
47 * New: Named arguments in `CodeBlock`. These are intended to make larger code snippets easier to
61 CodeBlock.Builder builder = CodeBlock.builder();
65 * New: `addJavadoc(CodeBlock)` overloads for TypeSpec, MethodSpec, and FieldSpec.
90 * New: Revive `CodeBlock.of()`, a handy factory method for building code blocks.
126 * New: `equals()` and `hashCode()` on `AnnotationSpec`, `CodeBlock`, `FieldSpec`, `JavaFile`,
DREADME.md408 Pass an argument value for each placeholder in the format string to `CodeBlock.add()`. In each
412 CodeBlock.builder().add("I ate $L $L", 3, "tacos")
421 CodeBlock.builder().add("I ate $2L $1L", "tacos", 3)
426 Use the syntax `$argumentName:X` where `X` is the format character and call `CodeBlock.addNamed()`
434 CodeBlock.builder().addNamed("I ate $count:L $food:L", map)
/external/giflib/
Ddgif_lib.c702 DGifGetCode(GifFileType *GifFile, int *CodeSize, GifByteType **CodeBlock) in DGifGetCode() argument
714 return DGifGetCodeNext(GifFile, CodeBlock); in DGifGetCode()
723 DGifGetCodeNext(GifFileType *GifFile, GifByteType **CodeBlock) in DGifGetCodeNext() argument
737 *CodeBlock = Private->Buf; /* Use private unused buffer. */ in DGifGetCodeNext()
738 (*CodeBlock)[0] = Buf; /* Pascal strings notation (pos. 0 is len.). */ in DGifGetCodeNext()
740 if (READ(GifFile, &((*CodeBlock)[1]), Buf) != Buf) { in DGifGetCodeNext()
745 *CodeBlock = NULL; in DGifGetCodeNext()
951 GifByteType *CodeBlock; in DGifGetLZCodes() local
966 if (DGifGetCodeNext(GifFile, &CodeBlock) == GIF_ERROR) in DGifGetLZCodes()
968 } while (CodeBlock != NULL) ; in DGifGetLZCodes()
Degif_lib.c706 EGifPutCode(GifFileType *GifFile, int CodeSize, const GifByteType *CodeBlock) in EGifPutCode() argument
725 return EGifPutCodeNext(GifFile, CodeBlock); in EGifPutCode()
734 EGifPutCodeNext(GifFileType *GifFile, const GifByteType *CodeBlock) in EGifPutCodeNext() argument
739 if (CodeBlock != NULL) { in EGifPutCodeNext()
740 if (InternalWrite(GifFile, CodeBlock, CodeBlock[0] + 1) in EGifPutCodeNext()
741 != (unsigned)(CodeBlock[0] + 1)) { in EGifPutCodeNext()
/external/swiftshader/third_party/llvm-7.0/llvm/utils/TableGen/
DPredicateExpander.h80 void expandCheckNonPortable(formatted_raw_ostream &OS, StringRef CodeBlock);
/external/swiftshader/third_party/llvm-7.0/llvm/include/llvm/Target/
DTargetInstrPredicate.td155 string CodeBlock = Code;
/external/llvm/docs/
DGarbageCollection.rst301 ;; "CodeBlock" is the block corresponding to the start
303 CodeBlock:
/external/swiftshader/third_party/llvm-7.0/llvm/docs/
DGarbageCollection.rst301 ;; "CodeBlock" is the block corresponding to the start
303 CodeBlock: