All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.neko233.config233.utils.FieldUtilsForConfig233.kt Maven / Gradle / Ivy

The newest version!
package com.neko233.config233.utils

import java.lang.reflect.Field

object FieldUtilsForConfig233 {
    @JvmStatic
    fun getAllFields(obj: Any): List {
        val fields = mutableListOf()

        var currentClass: Class<*>? = obj.javaClass
        while (currentClass != null) {
            fields.addAll(currentClass.declaredFields)
            currentClass = currentClass.superclass
        }

        return fields
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy