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

Answered

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..

 

0
5 comments

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

Please sign in to leave a comment.