[英]Converting private class from Kotlin to Java via bytecode
When the Kotlin code is compiled into Java byte code what happens with private class.当 Kotlin 代码被编译成 Java 字节码时,私有类会发生什么。 I ask it, because private classes are absent in Java.
我问它,因为 Java 中没有私有类。
When the Kotlin code is compiled into Java byte code modificators private
, protected
and public
is saved.当 Kotlin 代码被编译成 Java 字节码修饰符
private
、 protected
和public
被保存。 But There are two exceptions, internal turns into public
, because modificator internal is absent in java.但是有两个例外, internal 变成了
public
,因为 java 中没有修饰符 internal 。 And modificator private
with class turns into default
.而带有类的修饰符
private
变成了default
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.