How to all the default methods in JDK/JRE API interfaces using Structured Quary Language

已回答

I have come across the need to find all the default methods in JDK, I also understand Structured Query Language is the best to way to get there i.e. structural search..

if knows the syntax, pl. do share..

 

评论操作 固定链接

Intellij should consider building the structural search query visually with UI i.e. asking for access, method or class or interface, with return parameter type and with method parameter types etc.

0
评论操作 固定链接

Under the tool button in the upper right of the Structural Search dialog, select the Existing Templates action. In the dialog that appears select the Constructors & methods template and click OK. You can now edit this template in the Structural Search dialog. Add a default modifier. Now search in your desired scope.

1
评论操作 固定链接

Thank You Petr.

interface $Interface$ {
default $ReturnType$ $Method$ ($ParameterType$ $Parameter$);
}

As per this search in project and libraries scope in JDK 17 I do see 366 places for one parameter methods. 


For all 0 to infinity parameters use this 



and the count of such match in JDK 17 is 817

0
评论操作 固定链接

Is it possible to say this match should happen only in java.* package etc..as part of this structural search (want to eliminate all com.sun packages from the results.

0

请先登录再写评论。