Home
last modified time | relevance | path

Searched refs:codeWriter (Results 1 – 19 of 19) sorted by relevance

/external/kotlinpoet/kotlinpoet/src/main/java/com/squareup/kotlinpoet/
DTypeSpec.kt101 codeWriter: CodeWriter, in <lambda>()
111 val previousStatementLine = codeWriter.statementLine in <lambda>()
112 codeWriter.statementLine = -1 in <lambda>()
119 codeWriter.emitKdoc(kdocWithConstructorParameters()) in <lambda>()
120 codeWriter.emitAnnotations(annotationSpecs, false) in <lambda>()
121 codeWriter.emitCode("%N", enumName) in <lambda>()
123 codeWriter.emit("(") in <lambda>()
124 codeWriter.emitCode(superclassConstructorParametersBlock) in <lambda>()
125 codeWriter.emit(")") in <lambda>()
130 codeWriter.emit(" {\n") in <lambda>()
[all …]
DPropertySpec.kt68 codeWriter: CodeWriter, in <lambda>()
79 codeWriter.emitKdoc(kdoc.ensureEndsWithNewLine()) in <lambda>()
81 codeWriter.emitContextReceivers(contextReceiverTypes, suffix = "\n") in <lambda>()
82 codeWriter.emitAnnotations(annotations, inlineAnnotations) in <lambda>()
83 codeWriter.emitModifiers(propertyModifiers, implicitModifiers) in <lambda>()
84 codeWriter.emitCode(if (mutable) "var·" else "val·") in <lambda>()
86 codeWriter.emitTypeVariables(typeVariables) in <lambda>()
87 codeWriter.emit(" ") in <lambda>()
91 codeWriter.emitCode("(%T).", receiverType) in <lambda>()
93 codeWriter.emitCode("%T.", receiverType) in <lambda>()
[all …]
DFunSpec.kt84 codeWriter: CodeWriter, in <lambda>()
90 codeWriter.emitKdoc(kdocWithTags()) in <lambda>()
92 codeWriter.emitKdoc(kdoc.ensureEndsWithNewLine()) in <lambda>()
94 codeWriter.emitContextReceivers(contextReceiverTypes, suffix = "\n") in <lambda>()
95 codeWriter.emitAnnotations(annotations, false) in <lambda>()
96 codeWriter.emitModifiers(modifiers, implicitModifiers) in <lambda>()
99 codeWriter.emitCode("fun·") in <lambda>()
103 codeWriter.emitTypeVariables(typeVariables) in <lambda>()
104 codeWriter.emit(" ") in <lambda>()
106 emitSignature(codeWriter, enclosingName) in <lambda>()
[all …]
DFileSpec.kt64 val codeWriter = CodeWriter.withCollectedImports( in <lambda>() constant
70 emit(codeWriter, collectingImports = false) in <lambda>()
71 codeWriter.close() in <lambda>()
121 private fun emit(codeWriter: CodeWriter, collectingImports: Boolean) { in <lambda>()
123 codeWriter.emitComment(comment) in <lambda>()
127 codeWriter.emitAnnotations(annotations, inline = false) in <lambda>()
128 codeWriter.emit("\n") in <lambda>()
131 codeWriter.pushPackage(packageName) in <lambda>()
136 codeWriter.emitCode("package·%L\n", escapedPackageName) in <lambda>()
137 codeWriter.emit("\n") in <lambda>()
[all …]
DParameterSpec.kt55 codeWriter: CodeWriter, in <lambda>()
60 if (emitKdoc) codeWriter.emitKdoc(kdoc.ensureEndsWithNewLine()) in <lambda>()
61 codeWriter.emitAnnotations(annotations, inlineAnnotations) in <lambda>()
62 codeWriter.emitModifiers(modifiers) in <lambda>()
63 if (name.isNotEmpty()) codeWriter.emitCode("%N", this) in <lambda>()
64 if (name.isNotEmpty() && includeType) codeWriter.emitCode(":·") in <lambda>()
65 if (includeType) codeWriter.emitCode("%T", type) in <lambda>()
66 emitDefaultValue(codeWriter) in <lambda>()
69 internal fun emitDefaultValue(codeWriter: CodeWriter) { in <lambda>()
71 codeWriter.emitCode(if (defaultValue.hasStatements()) " = %L" else " = «%L»", defaultValue) in <lambda>()
[all …]
DTypeAliasSpec.kt37 internal fun emit(codeWriter: CodeWriter) { in <lambda>()
38 codeWriter.emitKdoc(kdoc.ensureEndsWithNewLine()) in <lambda>()
39 codeWriter.emitAnnotations(annotations, false) in <lambda>()
40 codeWriter.emitModifiers(modifiers, setOf(PUBLIC)) in <lambda>()
41 codeWriter.emitCode("typealias %N", name) in <lambda>()
42 codeWriter.emitTypeVariables(typeVariables) in <lambda>()
43 codeWriter.emitCode(" = %T", type) in <lambda>()
44 codeWriter.emit("\n") in <lambda>()
DAnnotationSpec.kt43 internal fun emit(codeWriter: CodeWriter, inline: Boolean, asParameter: Boolean = false) { in <lambda>()
45 codeWriter.emit("@") in <lambda>()
48 codeWriter.emit(useSiteTarget.keyword + ":") in <lambda>()
50 codeWriter.emitCode("%T", typeName) in <lambda>()
70 codeWriter.emit("(") in <lambda>()
71 if (members.size > 1) codeWriter.emit(whitespace).indent(1) in <lambda>()
72 codeWriter.emitCode( in <lambda>()
78 if (members.size > 1) codeWriter.unindent(1).emit(whitespace) in <lambda>()
79 codeWriter.emit(")") in <lambda>()
DCodeWriter.kt45 codeWriter: CodeWriter, in buildCodeString()
49 codeWriter.emitInto(stringBuilder, builderAction) in buildCodeString()
402 codeWriter = this, in emitLiteral()
DCodeBlock.kt166 internal fun toString(codeWriter: CodeWriter): String = buildCodeString(codeWriter) { in <lambda>()
/external/javapoet/src/main/java/com/squareup/javapoet/
DTypeSpec.java186 void emit(CodeWriter codeWriter, String enumName, Set<Modifier> implicitModifiers) in emit() argument
190 int previousStatementLine = codeWriter.statementLine; in emit()
191 codeWriter.statementLine = -1; in emit()
195 codeWriter.emitJavadoc(javadoc); in emit()
196 codeWriter.emitAnnotations(annotations, false); in emit()
197 codeWriter.emit("$L", enumName); in emit()
199 codeWriter.emit("("); in emit()
200 codeWriter.emit(anonymousTypeArguments); in emit()
201 codeWriter.emit(")"); in emit()
206 codeWriter.emit(" {\n"); in emit()
[all …]
DAnnotationSpec.java53 void emit(CodeWriter codeWriter, boolean inline) throws IOException { in emit() argument
58 codeWriter.emit("@$T", type); in emit()
61 codeWriter.emit("@$T(", type); in emit()
62 emitAnnotationValues(codeWriter, whitespace, memberSeparator, members.get("value")); in emit()
63 codeWriter.emit(")"); in emit()
73 codeWriter.emit("@$T(" + whitespace, type); in emit()
74 codeWriter.indent(2); in emit()
78 codeWriter.emit("$L = ", entry.getKey()); in emit()
79 emitAnnotationValues(codeWriter, whitespace, memberSeparator, entry.getValue()); in emit()
80 if (i.hasNext()) codeWriter.emit(memberSeparator); in emit()
[all …]
DMethodSpec.java83 void emit(CodeWriter codeWriter, String enclosingName, Set<Modifier> implicitModifiers) in emit() argument
85 codeWriter.emitJavadoc(javadocWithParameters()); in emit()
86 codeWriter.emitAnnotations(annotations, false); in emit()
87 codeWriter.emitModifiers(modifiers, implicitModifiers); in emit()
90 codeWriter.emitTypeVariables(typeVariables); in emit()
91 codeWriter.emit(" "); in emit()
95 codeWriter.emit("$L($Z", enclosingName); in emit()
97 codeWriter.emit("$T $L($Z", returnType, name); in emit()
103 if (!firstParameter) codeWriter.emit(",").emitWrappingSpace(); in emit()
104 parameter.emit(codeWriter, !i.hasNext() && varargs); in emit()
[all …]
DFieldSpec.java55 void emit(CodeWriter codeWriter, Set<Modifier> implicitModifiers) throws IOException { in emit() argument
56 codeWriter.emitJavadoc(javadoc); in emit()
57 codeWriter.emitAnnotations(annotations, false); in emit()
58 codeWriter.emitModifiers(modifiers, implicitModifiers); in emit()
59 codeWriter.emit("$T $L", type, name); in emit()
61 codeWriter.emit(" = "); in emit()
62 codeWriter.emit(initializer); in emit()
64 codeWriter.emit(";\n"); in emit()
81 CodeWriter codeWriter = new CodeWriter(out); in toString() local
82 emit(codeWriter, Collections.emptySet()); in toString()
DJavaFile.java99 CodeWriter codeWriter in writeTo() local
101 emit(codeWriter); in writeTo()
182 private void emit(CodeWriter codeWriter) throws IOException { in emit() argument
183 codeWriter.pushPackage(packageName); in emit()
186 codeWriter.emitComment(fileComment); in emit()
190 codeWriter.emit("package $L;\n", packageName); in emit()
191 codeWriter.emit("\n"); in emit()
196 codeWriter.emit("import static $L;\n", signature); in emit()
198 codeWriter.emit("\n"); in emit()
202 for (ClassName className : new TreeSet<>(codeWriter.importedTypes().values())) { in emit()
[all …]
DParameterSpec.java53 void emit(CodeWriter codeWriter, boolean varargs) throws IOException { in emit() argument
54 codeWriter.emitAnnotations(annotations, true); in emit()
55 codeWriter.emitModifiers(modifiers); in emit()
57 TypeName.asArray(type).emit(codeWriter, true); in emit()
59 type.emit(codeWriter); in emit()
61 codeWriter.emit(" $L", name); in emit()
78 CodeWriter codeWriter = new CodeWriter(out); in toString() local
79 emit(codeWriter, false); in toString()
DTypeName.java211 CodeWriter codeWriter = new CodeWriter(resultBuilder); in toString() local
212 emit(codeWriter); in toString()
/external/smali/dexlib2/src/main/java/org/jf/dexlib2/writer/
DDexWriter.java870 DexDataWriter codeWriter = new DexDataWriter(temp, 0);
914 codeWriter, ehBuf, methodKey, tryBlocks, instructions, debugItemOffset);
929 codeWriter.close();
/external/google-smali/dexlib2/src/main/java/com/android/tools/smali/dexlib2/writer/
DDexWriter.java1072 DexDataWriter codeWriter = new DexDataWriter(temp, 0);
1116 codeWriter, ehBuf, methodKey, tryBlocks, instructions, debugItemOffset);
1131 codeWriter.close();
/external/kotlinpoet/kotlinpoet/src/test/java/com/squareup/kotlinpoet/
DFunSpecTest.kt230 codeWriter = it, in returnsLongExpression()