Closed lm-sousa closed 4 months ago
If someone wants to do a Query in a programmatic way, where a functions accepts an array of join point types that will be used in consecutive searches, this API will work, as it would currently with the strings?
The question relates to if removing support for strings (which this PR deprecates) reduces current functionality or not.
Short answer? Yes. Searching with the old string API is still supported (but tagged as deprecated and for removal).
In that context, using the new API would be a matter of modifying that function to receive an array of Joinpoint constructors instead of strings. Then, on each iteration of a loop, a constructor would be used. Type inference (and supported filtering) will be limited to things only supported by the base class of the array (in the worst case, only the base Joinpoint). What I mean by this is that, a type error will be thrown if you try to filter by the content of a attribute not shared by all joinpoint types defined in the function arguments.
Both
Query
andSelector
APIs now accept wrapper classes as filters instead of strings. Method variants that use strings to filter by joinpoint type have been tagged as deprecated and will be removed in the future. Both APIs now report correct type information about their results.