Package-level declarations

Functions

Link copied to clipboard
inline fun <T : Any> T.callFieldWithArguments(fieldName: String, vararg arguments: Any)
inline fun <T : Any> T.callFieldWithArguments(fieldName: String, arguments: Map<KParameter, Any?>)

Calls this callable with the specified list of arguments and returns the result. Throws an exception if the number of specified arguments is not equal to the size of arguments, or if their types do not match the types of the parameters.

Link copied to clipboard
fun Any.callMethod(methodName: String, parameterTypes: Array<Class<*>>, parameters: Array<Any>): Any?

Direct call a function of an object

Link copied to clipboard
inline fun <T> T.callPrivateFunction(name: String, vararg args: Any?): Any?
Link copied to clipboard
inline fun <T : Any> T.fieldDeclaredAnnotations(fieldName: String): Array<out Annotation>?
Link copied to clipboard
fun Any.fieldPropertyValue(equalsToFieldName: String): Any?

Finds property if the name is exact as the one provided

Link copied to clipboard
inline fun <T : Any> T.fieldToGenericString(fieldName: String): String?
Link copied to clipboard
fun Any.firstPropertyValue(equalsToFieldName: String): String

Finds first property if the name is exact as the one provided or returns an empty string if not found When using proguard keep your class object

Link copied to clipboard
fun getAllFieldsList(cls: Class<*>?): List<Field?>?

Traverses current class and all the super classes (parents)

Link copied to clipboard
inline fun <T : Any> T.getAnnotations(fieldName: String): List<Annotation>?
Link copied to clipboard
inline fun <T : Any> T.getClasstype(fieldName: String): Class<out Any>?
Link copied to clipboard
fun getConstructor(className: String, parameterTypes: Array<Class<*>>): Constructor<*>?
Link copied to clipboard
fun Any.getDeclaredField(fieldName: String): Field?
Link copied to clipboard
fun Any.getDeclaredMethod(methodName: String, vararg parameterTypes: Class<*>): Method?

Get DeclaredMethod

Link copied to clipboard
inline fun <T : Any> T.getDeclaringClass(fieldName: String): Class<*>?
Link copied to clipboard
Link copied to clipboard

Returns a parameter representing the extension receiver instance needed to call this callable, or null if this callable is not an extension.

Link copied to clipboard
inline fun <T : Any> T.getFieldInstanceParameter(fieldName: String): KParameter?

Returns a parameter representing the this instance needed to call this callable, or null if this callable is not a member of a class and thus doesn't take such parameter.

Link copied to clipboard
inline fun <T : Any> T.getFieldModifiers(fieldName: String): Int?
Link copied to clipboard
inline fun <T : Any> T.getFieldParameters(fieldName: String): List<KParameter>?
Link copied to clipboard
inline fun <T : Any> T.getFieldTypeParameters(fieldName: String): List<KTypeParameter>?
Link copied to clipboard
fun Any.getFieldValue(fieldName: String): Any?
Link copied to clipboard
inline fun <T : Any> T.getFieldValueBoolean(fieldName: String): Boolean?
Link copied to clipboard
inline fun <T : Any> T.getFieldValueByFieldName(fieldName: String): Any?
Link copied to clipboard
inline fun <T : Any> T.getFieldValueByte(fieldName: String): Byte?
Link copied to clipboard
inline fun <T : Any> T.getFieldValueChar(fieldName: String): Char?
Link copied to clipboard
inline fun <T : Any> T.getFieldValueDouble(fieldName: String): Double?
Link copied to clipboard
inline fun <T : Any> T.getFieldValueFloat(fieldName: String): Float?
Link copied to clipboard
inline fun <T : Any> T.getFieldValueInt(fieldName: String): Int?
Link copied to clipboard
inline fun <T : Any> T.getFieldValueLong(fieldName: String): Long?
Link copied to clipboard
inline fun <T : Any> T.getFieldValueShort(fieldName: String): Short?
Link copied to clipboard
inline fun <T : Any> T.getGenericType(fieldName: String): Type?
Link copied to clipboard
inline fun <T : Any> T.getGenericTypeName(fieldName: String): String?
Link copied to clipboard
inline fun <T : Any> T.getGetter(fieldName: String): KProperty.Getter<Any?>?
Link copied to clipboard
inline fun <T : Any> T.getObjectHashCode(fieldName: String): Int?

If the object has hash code returns it else null

Link copied to clipboard
fun getObjectInstance(className: String, parameterTypes: Array<Class<*>>, parameters: Array<Any>): Any?
Link copied to clipboard
fun Any.invokeMethod(methodName: String, parameterTypes: Array<Class<*>>, parameters: Array<Any>): Any?
Link copied to clipboard
inline fun <T : Any> T.isAbstract(): Boolean
inline fun <T : KClass<T>> T.isAbstract(): Boolean
inline fun <T : Any> T.isAbstract(fieldName: String): Boolean?
Link copied to clipboard
inline fun <T : Any> T.isCompanion(): Boolean
inline fun <T : KClass<T>> T.isCompanion(): Boolean
Link copied to clipboard
inline fun <T : Any> T.isConstant(fieldName: String): Boolean?
Link copied to clipboard
inline fun <T : Any> T.isDataClass(): Boolean
inline fun <T : KClass<T>> T.isDataClass(): Boolean
Link copied to clipboard
inline fun <T : Any> T.isFieldAccessible(fieldName: String): Boolean?
Link copied to clipboard
inline fun <T : Any> T.isFieldEnumConstant(fieldName: String): Boolean?
Link copied to clipboard
inline fun <T : Any> T.isFieldNull(fieldName: String): Boolean?
Link copied to clipboard
inline fun <T : Any> T.isFieldSynthetic(fieldName: String): Boolean?
Link copied to clipboard
inline fun <T : Any> T.isFinal(): Boolean
inline fun <T : KClass<T>> T.isFinal(): Boolean
inline fun <T : Any> T.isFinal(fieldName: String): Boolean?
Link copied to clipboard
inline fun <T : Any> T.isInner(): Boolean
inline fun <T : KClass<T>> T.isInner(): Boolean
Link copied to clipboard
inline fun <T : Any> T.isLateInit(fieldName: String): Boolean?
Link copied to clipboard
inline fun <T : Any> T.isOpen(): Boolean
inline fun <T : KClass<T>> T.isOpen(): Boolean
inline fun <T : Any> T.isOpen(fieldName: String): Boolean?
Link copied to clipboard
inline fun <T : Any> T.isSealed(): Boolean
inline fun <T : KClass<T>> T.isSealed(): Boolean
Link copied to clipboard
inline fun <T : Any> T.isSuspend(fieldName: String): Boolean?
Link copied to clipboard
inline fun <T : Any> T.isSynthetic(fieldName: String): Boolean?
Link copied to clipboard
inline fun <T> T.logString(): String
Link copied to clipboard
inline fun <T : Any> T.setFieldAccessible(fieldName: String)
Link copied to clipboard
fun Any.setFieldPropertyValue(fieldName: String, fieldValue: Any)

Setting the field values by their names ignoring caps, lower cases and such, in case of API shit show when mapping is needed

Link copied to clipboard
fun Any.setFieldValue(fieldName: String, value: Any)
Link copied to clipboard
inline fun <T> T.setProperty(property: String, value: Any?)
Link copied to clipboard
inline fun tryOrIgnore(runnable: () -> Unit)

try the code in runnable, If it runs then its perfect if its not, It won't crash your app.

Link copied to clipboard
inline fun <T> tryOrNull(block: () -> T): T?