I try to create a query to get all methods with a specific return type. Looking at the definitions of FAMIXMethod
and FAMIXBehavioralEntity
I think the declaredType: is the correct method for this query on FAMIXMethodGroup
.
I've tried to use the query:
self select: [ :each | each declaredType: String ]
But this stops with an
error: "MessageNotUnderstood"
declaredType:
is a setter, so you are trying to change the declaredType, which is expected to be aFAMIXType
. Thus the MessageNotUnderstood.A possible approach is to get the declaredType (which is a (sub)instance of
FAMIXType
) and ask for thesmalltalkClass
. Note that declaredType may not exist.Maybe a simpler approach can be devised with Moose Query, but I am not familiar with that.