docs: update api docs

This commit is contained in:
2023-10-01 01:00:20 +08:00
parent c9e2720afc
commit 2ee38ee54e
2 changed files with 26 additions and 6 deletions

View File

@@ -27,11 +27,11 @@ class GenericClass internal constructor(private val type: ParameterizedType)
## argument <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun argument(index: Int): Class<*>
fun argument(index: Int): Class<*>?
```
```kotlin:no-line-numbers
inline fun <reified T> argument(index: Int): Class<T>
inline fun <reified T> argument(index: Int): Class<T>?
```
**Change Records**
@@ -42,6 +42,16 @@ inline fun <reified T> argument(index: Int): Class<T>
新增泛型返回值 `Class<T>` 方法
`v1.2.0` `modified`
方法的返回值可为 `null`
**Function Illustrate**
> 获得泛型参数数组下标的 `Class` 实例。
> 获得泛型参数数组下标的 `Class` 实例。
::: warning
在运行时局部变量的泛型会被擦除,获取不到时将会返回 **null**
:::

View File

@@ -19,11 +19,11 @@ class GenericClass internal constructor(private val type: ParameterizedType)
## argument <span class="symbol">- method</span>
```kotlin:no-line-numbers
fun argument(index: Int): Class<*>
fun argument(index: Int): Class<*>?
```
```kotlin:no-line-numbers
inline fun <reified T> argument(index: Int): Class<T>
inline fun <reified T> argument(index: Int): Class<T>?
```
**变更记录**
@@ -34,6 +34,16 @@ inline fun <reified T> argument(index: Int): Class<T>
新增泛型返回值 `Class<T>` 方法
`v1.2.0` `修改`
方法的返回值可为 `null`
**功能描述**
> 获得泛型参数数组下标的 `Class` 实例。
> 获得泛型参数数组下标的 `Class` 实例。
::: warning
在运行时局部变量的泛型会被擦除,获取不到时将会返回 **null**
:::