How to Determine whether a Type is MetricEvaluatable

#1

For example, Facility mixes FixedAsset which mixes MetricEvaluatable. Facility.mixin(“MetricEvaluatable”) will return null because Facility doesn’t mix MetricEvaluatable directly. Is there a similar function that can do a deep search of all the types one type is mixed with?

0 Likes

#2

Facility.isA(MetricEvaluatable)

0 Likes

#3

There is also Facility.deepMixins() which will do exactly as you say, deep search all the types one is mixed with. However for your use case, Henry’s solution should work well.

0 Likes