in crumb-core/src/main/kotlin/com/uber/crumb/core/CrumbOutputLanguage.kt [53:70]
override fun close() {
val typeSpec = TypeSpec.classBuilder(fileName)
.addJavadoc(EXPLANATORY_COMMENT)
.addAnnotation(AnnotationSpec.builder(CrumbIndex::class.java)
.addMember("value", "\$L", buffer.readByteArray().joinToString(",", prefix = "{", postfix = "}"))
.build())
.addModifiers(FINAL)
.addMethod(MethodSpec.constructorBuilder().addModifiers(PRIVATE).build())
.apply {
originatingElements.forEach { addOriginatingElement(it) }
}
.build()
JavaFile.builder(packageName, typeSpec)
.addFileComment(GENERATED_COMMENT)
.indent(INDENT)
.build()
.writeTo(filer)
}