"trait" -> "interface"

This commit is contained in:
Valentin Kipyatkov
2015-05-27 13:37:21 +03:00
parent 87cb36e8e9
commit f89cff8b78
5 changed files with 6 additions and 6 deletions
@@ -172,7 +172,7 @@ class Converter private(
return when {
psiClass.isInterface() -> {
val classBody = ClassBodyConverter(psiClass, this, isOpenClass = false, isObject = false).convertBody()
Trait(name, annotations, modifiers, typeParameters, extendsTypes, implementsTypes, classBody)
Interface(name, annotations, modifiers, typeParameters, extendsTypes, implementsTypes, classBody)
}
psiClass.isEnum() -> {
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.j2k.ast
import org.jetbrains.kotlin.j2k.CodeBuilder
class AnonymousClassBody(body: ClassBody, val extendsTrait: Boolean)
class AnonymousClassBody(body: ClassBody, val extendsInterface: Boolean)
: Class(Identifier.Empty, Annotations.Empty, Modifiers.Empty, TypeParameterList.Empty, listOf(), null, listOf(), body) {
override fun generateCode(builder: CodeBuilder) {
body.append(builder)
@@ -33,12 +33,12 @@ class Function(
val typeParameterList: TypeParameterList,
parameterList: ParameterList,
body: DeferredElement<Block>?,
val isInTrait: Boolean
val isInInterface: Boolean
) : FunctionLike(annotations, modifiers, parameterList, body) {
private fun presentationModifiers(): Modifiers {
var modifiers = this.modifiers
if (isInTrait) {
if (isInInterface) {
modifiers = modifiers.without(Modifier.ABSTRACT)
}
@@ -16,7 +16,7 @@
package org.jetbrains.kotlin.j2k.ast
class Trait(
class Interface(
name: Identifier,
annotations: Annotations,
modifiers: Modifiers,
@@ -38,7 +38,7 @@ class NewClassExpression(
builder.append(name)
}
if (anonymousClass == null || !anonymousClass.extendsTrait) {
if (anonymousClass == null || !anonymousClass.extendsInterface) {
builder.append("(").append(arguments, ", ").append(")")
}