classafBeanUtils::ReflectUtils

sys::Obj
  afBeanUtils::ReflectUtils

Methods for finding fields, methods and ctors that match given parameter types.

findCtor

Source

static Method? findCtor(Type type, Str ctorName, Type[] params := (Type[])[,])

Finds a named ctor with the given parameter types.

findField

Source

static Field? findField(Type type, Str fieldName, Type fieldType)

Finds a field.

findMethod

Source

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

Source

static Bool fits(Type? typeA, Type? typeB)

A replacement for Type.fits() that takes into account type inference for Lists and Maps.

Returns true if typeA fits into typeB.

paramTypesFitMethodSignature

Source

static Bool paramTypesFitMethodSignature(Type?[] params, Method? method)

Returns true if the given parameter types fit the method signature.