From 20adce165fefbc3cbe401696761eaca8e4592339 Mon Sep 17 00:00:00 2001 From: Mikhael Bogdanov Date: Tue, 2 Apr 2019 13:06:28 +0200 Subject: [PATCH] Convert CapturedParamDesc.java into Kotlin --- .../codegen/inline/CapturedParamDesc.kt | 32 +++---------------- 1 file changed, 5 insertions(+), 27 deletions(-) diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/CapturedParamDesc.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/CapturedParamDesc.kt index 0151161dbae..31769fb6eee 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/CapturedParamDesc.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/inline/CapturedParamDesc.kt @@ -14,34 +14,12 @@ * limitations under the License. */ -package org.jetbrains.kotlin.codegen.inline; +package org.jetbrains.kotlin.codegen.inline -import org.jetbrains.annotations.NotNull; -import org.jetbrains.org.objectweb.asm.Type; +import org.jetbrains.org.objectweb.asm.Type -public class CapturedParamDesc { - private final Type containingLambdaType; - private final String fieldName; - private final Type type; +class CapturedParamDesc(private val containingLambdaType: Type, val fieldName: String, val type: Type) { - public CapturedParamDesc(@NotNull Type containingLambdaType, @NotNull String fieldName, @NotNull Type type) { - this.containingLambdaType = containingLambdaType; - this.fieldName = fieldName; - this.type = type; - } - - @NotNull - public String getContainingLambdaName() { - return containingLambdaType.getInternalName(); - } - - @NotNull - public String getFieldName() { - return fieldName; - } - - @NotNull - public Type getType() { - return type; - } + val containingLambdaName: String + get() = containingLambdaType.internalName }