android-beans / rocks.frieler.android.beans.scopes / ScopedBeanDefinition / canProduce

canProduce

fun canProduce(type: KClass<*>): Boolean

Overrides BeanDefinition.canProduce

Indicates whether this ScopedBeanDefinition can produce a bean of the given type (or a subtype), either directly or indirectly when the ScopedFactoryBean produces its bean.

Parameters

type - the type to compare with the bean's type

Return
true, if the desired type is assignable from the either the ScopedFactoryBean's type itself or the bean it produces, false otherwise