Added name, simpleName, toString function in CurrentClass and inline function in ReflectionFactory

This commit is contained in:
2022-08-14 02:50:29 +08:00
parent e9b09cf92e
commit 60c3b923df
4 changed files with 98 additions and 13 deletions

View File

@@ -16,6 +16,34 @@ class CurrentClass internal constructor(internal val classSet: Class<*>, interna
> 当前实例的类操作对象。
### name [field]
```kotlin
val name: String
```
**变更记录**
`v1.0.93` `新增`
**功能描述**
> 获得当前 `classSet` 的 `Class.getName`。
### simpleName [field]
```kotlin
val simpleName: String
```
**变更记录**
`v1.0.93` `新增`
**功能描述**
> 获得当前 `classSet` 的 `Class.getSimpleName`。
### superClass [method]
```kotlin
@@ -72,6 +100,34 @@ inner class SuperClass internal constructor()
> 当前类的父类实例的类操作对象。
#### name [field]
```kotlin
val name: String
```
**变更记录**
`v1.0.93` `新增`
**功能描述**
> 获得当前 `classSet` 中父类的 `Class.getName`。
#### simpleName [field]
```kotlin
val simpleName: String
```
**变更记录**
`v1.0.93` `新增`
**功能描述**
> 获得当前 `classSet` 中父类的 `Class.getSimpleName`。
#### field [method]
```kotlin

View File

@@ -442,11 +442,11 @@ inline fun Class<*>.constructor(initiate: ConstructorCondition): ConstructorFind
### current [method]
```kotlin
inline fun <reified T : Any> T.current(initiate: CurrentClass.() -> Unit): T
inline fun <reified T : Any> T.current(): CurrentClass
```
```kotlin
inline fun <reified T : Any> T.current(): CurrentClass
inline fun <reified T : Any> T.current(initiate: CurrentClass.() -> Unit): T
```
**变更记录**