Allow dynamic selectors to choose the class to perform member lookups in #2293
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
MixinSquared's
@TargetHandler
is a dynamic selector which targets merged handlers, the accepted references are the name of the mixin and the original name of the handler. The method targeting is the same as@At.method
but the members are declared in the mixin class specified by themixin
attribute, thus, when looking up members for a@TargetHandler
selector, the class specified inmixin
would be the one to lookup. Mcdev's member lookups work off the target class specified in the@Mixin
annotation, thus, this change is needed to allow the lookup to occur in a different class.This pr also fixes namespace lookup as you do not have to declare the namespace for a dynamic selector in the annotation and can instead declare it at registration.
See #2287