ClassHelper

The scoped helper for Class to quick do reflect things

See also

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun getStaticObjectOrNull(fieldName: String): Any?
Link copied to clipboard
fun <T> getStaticObjectOrNullAs(fieldName: String): T?
Link copied to clipboard
fun getStaticObjectOrNullUntilSuperclass(fieldName: String, untilSuperClass: Class<*>.() -> Boolean? = null): Any?
Link copied to clipboard
fun <T> getStaticObjectOrNullUntilSuperclassAs(fieldName: String, untilSuperClass: Class<*>.() -> Boolean? = null): T?
Link copied to clipboard
fun invokeStaticMethod(methodName: String, returnType: Class<*>? = null, paramTypes: ParamTypes = paramTypes(), params: Params = params()): Any?
Link copied to clipboard
fun invokeStaticMethodBestMatch(methodName: String, returnType: Class<*>? = null, vararg params: Any?): Any?
Link copied to clipboard

Check if two classes are equal or match the same primitive type

Link copied to clipboard
fun newInstance(paramTypes: ParamTypes = paramTypes(), params: Params = params()): Any
Link copied to clipboard
fun newInstanceBestMatch(vararg params: Any?): Any
Link copied to clipboard
fun setStaticObject(fieldName: String, value: Any?)
Link copied to clipboard
fun setStaticObjectUntilSuperclass(fieldName: String, value: Any?, untilSuperClass: Class<*>.() -> Boolean? = null)
Link copied to clipboard

Cast class to primitive type if possible