在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):Kotlin/kotlinx.reflect.lite开源软件地址(OpenSource Url):https://github.com/Kotlin/kotlinx.reflect.lite开源编程语言(OpenSource Language):Kotlin 72.9%开源软件介绍(OpenSource Introduction):kotlinx.reflect.liteThis library provides an API to introspect Kotlin symbols at runtime. Its main feature is the small size which makes it possible to use it on memory-constrained devices. MavenAdd jcenter repository (if you don't have it yet) <repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>bintray</name>
<url>https://jcenter.bintray.com</url>
</repository> Add a dependency: <dependency>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx.reflect.lite</artifactId>
<version>1.0.0</version>
</dependency> Gradlejcenter is configured by default in gradle however you may need to include it in some cases repositories {
jcenter()
} Add a dependency: compile 'org.jetbrains.kotlinx:kotlinx.reflect.lite:1.0.0' FAQWhy not just use Java reflection instead?Java reflection cannot figure out Kotlin-specific features of the introspected program. For example, nullability of Kotlin types is erased in JVM bytecode. Also parameter names were not supported in Java reflection until Java 8. Why not just use Kotlin reflection instead?While Kotlin has its own reflection library, its size is currently above 2Mb which may be unacceptable in some circumstances, for example on Android. The size of the minimized version of this library is about 100Kb plus the dependency on protobuf-java. What is supported?Currently the only supported features are names of parameters and nullability of their types. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论