classafBeanUtils::ReflectUtils
sys::Obj afBeanUtils::ReflectUtils
Methods for finding fields, methods and ctors that match given parameter types.
- findCtor
static Method? findCtor(Type type, Str ctorName, Type[] params := (Type[])[,])
Finds a named ctor with the given parameter types.
- findField
static Field? findField(Type type, Str fieldName, Type fieldType)
Finds a field.
- findMethod
static Method? findMethod(Type type, Str name, Type[] params := (Type[])[,], Bool isStatic := false, Type? returnType := null)
Finds a named method with the given parameter types.
- fits
static Bool fits(Type? typeA, Type? typeB)
A replacement for
Type.fits()
that takes into account type inference for Lists and Maps.Returns
true
iftypeA
fits intotypeB
.- paramTypesFitMethodSignature
static Bool paramTypesFitMethodSignature(Type?[] params, Method? method)
Returns
true
if the given parameter types fit the method signature.