New J2K: Add printing of Java new expression
This commit is contained in:
committed by
Ilya Kirillov
parent
6d283b0ac1
commit
44d2a6f432
@@ -371,6 +371,17 @@ class NewCodeBuilder {
|
||||
}
|
||||
}
|
||||
|
||||
override fun visitJavaNewExpression(javaNewExpression: JKJavaNewExpression) {
|
||||
printer.printWithNoIndent(FqName(javaNewExpression.constructorSymbol.fqName).shortName())//TODO import name somehow?
|
||||
printer.printWithNoIndent("(")
|
||||
//TODO use new sequence generator in future
|
||||
for ((index, argument) in javaNewExpression.arguments.expressions.withIndex()) {
|
||||
if (index > 0) printer.printWithNoIndent(", ")
|
||||
argument.accept(this)
|
||||
}
|
||||
printer.printWithNoIndent(")")
|
||||
}
|
||||
|
||||
override fun visitTypeElement(typeElement: JKTypeElement) {
|
||||
renderType(typeElement.type)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user