Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 18347 Details for
Bug 81377
[1.5][search] Semantics of search for methods with generics
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
New version for document search engine behavior
SearchGenericMethods_02.html (text/html), 37.81 KB, created by
Frederic Fusier
on 2005-02-27 18:20:19 EST
(
hide
)
Description:
New version for document search engine behavior
Filename:
MIME Type:
Creator:
Frederic Fusier
Created:
2005-02-27 18:20:19 EST
Size:
37.81 KB
patch
obsolete
><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> ><html> ><head> > <meta content="text/html; charset=ISO-8859-1" > http-equiv="content-type"> > <title>Java Search Engine behavior for generic methods and >constructors</title> ></head> ><body> ><h3>Sample for parameterized methods</h3> >Assuming that we have following code:<br> ><code> >public class Single<T> {<br> > public <U> void generic(U u) {}<br> > public void paramTypesArgs(Single<T> gst) {}<br> >}<br> ><br> >public class RefSingle {<br> > void testObject() {<br> > Single<Object> gs = new >Single<Object>();<br> > gs.<Object>generic(new >Object());<br> > gs.paramTypesArgs(gs);<br> > }<br> > void testException() {<br> > Single<Exception> gs = new >Single<Exception>();<br> > gs.<Exception>generic(new >Exception());<br> > gs.paramTypesArgs(gs);<br> > }<br> > void testRuntimeException() {<br> > Single<RuntimeException>gs = new >Single<RuntimeException>();<br> > gs.<RuntimeException>generic(new >RuntimeException());<br> > gs.paramTypesArgs(gs);<br> > }<br> > void testRaw() {<br> > Single gs = new Single();<br> > gs.generic(new Exception());<br> > gs.paramTypesArgs(gs);<br> > }<br> >}<br> ></code> ><br> ><h3>Search for generic methods</h3> ><h4>Example of pattern<br> ></h4> >A sample of pattern to search generic method is: <code><U>generic(U)</code>.<br> ><em><br> >Note: it is >not possible to perform this kind of search using dialog. In search >dialog string, all types specified between <> are considered as >type arguments and not as type parameters.</em> ><h4>Declarations</h4> ><ul> > <li> declaration matches to generic methods are always >R_EXACT_MATCH</li> ></ul> ><ul> ></ul> ><h4>References</h4> ><ul> > <li>reference matches to generic methods are always R_ERASURE_MATCH</li> ></ul> ><ul> ></ul> ><h3>Search for parameterized or raw methods</h3> ><ul> ></ul> ><h4>Search pattern mode<br> ></h4> ><code>R_ERASURE_MATCH</code> ><ul> > <li>find all exact, compatible or with same erasure matches which >will be erasure (ie. <code>isErasure()</code> will answer <code>true</code>).</li> > <li>selection is always just erasure name (for example: <code>generic("")</code>).</li> ></ul> ><code>R_EQUIVALENT_MATCH</code> ><ul> > <li>find all exact or compatible matches which will be erasure and >equivalent (ie. <code>isErasure()</code> and <code>isEquivalent()</code> >will both answer <code>true</code>). </li> > <li>selection is the entire reference including type arguments only >if both pattern and match have ones (for example: <code><String>generic("")</code>).<br> >Otherwise, only method selector and parameters are selected (for >example: <code>generic("")</code>).</li> ></ul> ><code>R_FULL_MATCH</code> ><ul> > <li>find all exact matches. Corresponding matches will be erasure, >equivalent and exact (ie. <code>isErasure()</code>, <code>isEquivalent()</code>and > <code>isExact()</code>will all answer <code>true</code>). </li> > <li>selection is the entire reference including type arguments only >if both pattern and match have ones (for example: <code><String>generic("")</code>).<br> >Otherwise, only method selector and parameters are selected (for >example: <code>generic("")</code>).</li> ></ul> ><ul> ></ul> ><h4>Declarations</h4> ><ul> > <li>matches to declaration of generic methods are always R_EXACT_MATCH</li> ></ul> ><ul> ></ul> ><h4>References</h4> ><table style="text-align: left; width: 1237px; height: 99px;" border="1" > cellpadding="1" cellspacing="1"> > <tbody> > <tr> > <td rowspan="2" colspan="1" > style="vertical-align: top; background-color: rgb(204, 204, 204); text-align: center; font-family: arial; font-weight: bold;">String >search pattern</td> > <td colspan="1" rowspan="2" > style="vertical-align: top; font-weight: bold; text-align: center; font-family: arial; background-color: rgb(204, 204, 204);"><br> >Code </td> > <td colspan="2" rowspan="1" > style="vertical-align: top; text-align: center; background-color: rgb(204, 204, 204);"><span > style="font-weight: bold; font-family: arial;">SearchMatch</span><br> > </td> > </tr> > <tr> > <td > style="vertical-align: top; font-weight: bold; text-align: center; font-family: arial; background-color: rgb(204, 204, 204);">Rule<br> > <small><code>SearchPattern.R_...</code></small><br> > </td> > <td > style="vertical-align: top; text-align: center; background-color: rgb(204, 204, 204);"><span > style="font-family: arial; font-weight: bold;">Raw<br> > </span> </td> > </tr> > <tr> > <td colspan="1" rowspan="4" > style="vertical-align: top; text-align: center; font-family: courier new; font-weight: bold;"><br> >generic<br> > </td> > <td > style="vertical-align: top; text-align: center; font-family: courier new;"><small><span > style="font-style: italic;"></span><span style="font-weight: bold;"></span></small>generic(exc)<br> > </td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_FULL_MATCH</big></small></small> > </td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">true</span></small></td> > </tr> > <tr> > <td > style="vertical-align: top; text-align: center; font-family: courier new;"><Object>generic(obj)</td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_FULL_MATCH</big></small></small></td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">false</span></small></td> > </tr> > <tr> > <td > style="vertical-align: top; text-align: center; font-family: courier new;"><Exception>generic(exc)</td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_FULL_MATCH</big></small></small></td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">false</span></small></td> > </tr> > <tr> > <td > style="vertical-align: top; text-align: center; font-family: courier new;"><RuntimeException>generic(run)</td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_FULL_MATCH</big></small></small></td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">false</span></small> </td> > </tr> > <tr> > <td style="background-color: rgb(192, 192, 192);"><br> > </td> > <td style="background-color: rgb(192, 192, 192);"><br> > </td> > <td style="background-color: rgb(192, 192, 192);"><br> > </td> > <td style="background-color: rgb(192, 192, 192);"><br> > </td> > </tr> > <tr> > <td rowspan="1" > style="vertical-align: top; text-align: center; font-family: arial; font-weight: bold;"><code><Exception>generic(Exception)</code></td> > <td > style="vertical-align: top; text-align: center; font-family: courier new;"><Exception>generic(exc)</td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_FULL_MATCH</big></small></small></td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">false</span></small></td> > </tr> > <tr> > <td style="background-color: rgb(192, 192, 192);"><br> > </td> > <td style="background-color: rgb(192, 192, 192);"><br> > </td> > <td style="background-color: rgb(192, 192, 192);"><br> > </td> > <td style="background-color: rgb(192, 192, 192);"><br> > </td> > </tr> > <tr> > <td colspan="1" rowspan="4" > style="vertical-align: top; text-align: center; font-family: courier new; font-weight: bold;"><br> > <br> ><U>generic(U)<br> > </td> > <td > style="vertical-align: top; text-align: center; font-family: courier new;">generic(exc)<br> > </td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_EQUIVALENT_MATCH</big></small></small></td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">true</span></small></td> > </tr> > <tr> > <td > style="vertical-align: top; text-align: center; font-family: courier new;"><Object>generic(obj)</td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_FULL_MATCH</big></small></small></td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">false</span></small></td> > </tr> > <tr> > <td > style="vertical-align: top; text-align: center; font-family: courier new;"><Exception>generic(exc)</td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_FULL_MATCH</big></small></small></td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">false</span></small></td> > </tr> > <tr> > <td > style="vertical-align: top; text-align: center; font-family: courier new;"><RuntimeException>generic(run)</td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_FULL_MATCH</big></small></small></td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">false</span></small> </td> > </tr> > <tr> > <td style="background-color: rgb(192, 192, 192);"><br> > </td> > <td style="background-color: rgb(192, 192, 192);"><br> > </td> > <td style="background-color: rgb(192, 192, 192);"><br> > </td> > <td style="background-color: rgb(192, 192, 192);"><br> > </td> > </tr> > <tr> > <td rowspan="1" > style="vertical-align: top; text-align: center; font-family: arial; font-weight: bold;"><code><? >extends Exception>generic(Exception)</code></td> > <td > style="vertical-align: top; text-align: center; font-family: courier new;"><Exception>generic(exc)</td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_EQUIVALENT_MATCH</big></small></small></td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">false</span></small></td> > </tr> > <tr> > <td style="background-color: rgb(192, 192, 192);"><br> > </td> > <td style="background-color: rgb(192, 192, 192);"><br> > </td> > <td style="background-color: rgb(192, 192, 192);"><br> > </td> > <td style="background-color: rgb(192, 192, 192);"><br> > </td> > </tr> > <tr> > <td colspan="1" rowspan="4" > style="vertical-align: top; text-align: center; font-family: courier new; font-weight: bold;"><br> > <br> ><? extends Exception>generic(U)<br> > </td> > <td > style="vertical-align: top; text-align: center; font-family: courier new;">generic(exc)<br> > </td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_EQUIVALENT_MATCH</big></small></small></td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">true</span></small></td> > </tr> > <tr> > <td > style="vertical-align: top; text-align: center; font-family: courier new;"><Object>generic(obj)</td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_ERASURE_MATCH</big></small></small></td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">false</span></small></td> > </tr> > <tr> > <td > style="vertical-align: top; text-align: center; font-family: courier new;"><Exception>generic(exc)</td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_</big></small></small><small><small><big>EQUIVALENT</big></small></small><small><small><big>_MATCH</big></small></small></td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">false</span></small></td> > </tr> > <tr> > <td > style="vertical-align: top; text-align: center; font-family: courier new;"><RuntimeException>generic(run)</td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_EQUIVALENT_MATCH</big></small></small></td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">false</span></small> </td> > </tr> > </tbody> ></table> ><br> ><em>Note: it is >not possible to have extends clause while using IJavaElement search >pattern >as syntax does not allow it in code.</em><br> ><table style="text-align: left; width: 1237px; height: 99px;" border="1" > cellpadding="1" cellspacing="1"> > <tbody> > <tr> > <td rowspan="2" colspan="1" > style="vertical-align: top; background-color: rgb(204, 204, 204); text-align: center; font-family: arial; font-weight: bold;"><br> >IJavaElement search pattern</td> > <td colspan="1" rowspan="2" > style="vertical-align: top; font-weight: bold; text-align: center; font-family: arial; background-color: rgb(204, 204, 204);"><br> >Code </td> > <td colspan="2" rowspan="1" > style="vertical-align: top; text-align: center; background-color: rgb(204, 204, 204);"><span > style="font-weight: bold; font-family: arial;">SearchMatch</span><br> > </td> > </tr> > <tr> > <td > style="vertical-align: top; font-weight: bold; text-align: center; font-family: arial; background-color: rgb(204, 204, 204);">Rule<br> > <small><code>SearchPattern.R_...</code></small><br> > </td> > <td > style="vertical-align: top; text-align: center; background-color: rgb(204, 204, 204);"><span > style="font-family: arial; font-weight: bold;">Raw<br> > </span> </td> > </tr> > <tr> > <td colspan="1" rowspan="4" > style="vertical-align: top; text-align: center; font-family: courier new; font-weight: bold;"><br> >generic(null);<br> > </td> > <td > style="vertical-align: top; text-align: center; font-family: courier new;">generic(exc)<br> > </td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_FULL_MATCH</big></small></small><br> > </td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">true</span></small></td> > </tr> > <tr> > <td > style="vertical-align: top; text-align: center; font-family: courier new;"><Object>generic(obj)</td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_EQUIVALENT_MATCH</big></small></small></td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">false</span></small></td> > </tr> > <tr> > <td > style="vertical-align: top; text-align: center; font-family: courier new;"><Exception>generic(exc)</td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_EQUIVALENT_MATCH</big></small></small></td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">false</span></small></td> > </tr> > <tr> > <td > style="vertical-align: top; text-align: center; font-family: courier new;"><RuntimeException>generic(run)</td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_EQUIVALENT_MATCH</big></small></small></td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">false</span></small> </td> > </tr> > <tr> > <td > style="background-color: rgb(192, 192, 192); font-weight: bold;"><br> > </td> > <td style="background-color: rgb(192, 192, 192);"><br> > </td> > <td style="background-color: rgb(192, 192, 192);"><br> > </td> > <td style="background-color: rgb(192, 192, 192);"><br> > </td> > </tr> > <tr> > <td colspan="1" rowspan="4" > style="vertical-align: top; text-align: center; font-family: courier new; font-weight: bold;"><br> > <br> ><Exception>generic(exc);<br> > </td> > <td > style="vertical-align: top; text-align: center; font-family: courier new;">generic(exc)<br> > </td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_EQUIVALENT_MATCH</big></small></small></td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">true</span></small></td> > </tr> > <tr> > <td > style="vertical-align: top; text-align: center; font-family: courier new;"><Object>generic(obj)</td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_ERASURE_MATCH</big></small></small></td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">false</span></small></td> > </tr> > <tr> > <td > style="vertical-align: top; text-align: center; font-family: courier new;"><Exception>generic(exc)</td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_FULL_MATCH</big></small></small></td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">false</span></small></td> > </tr> > <tr> > <td > style="vertical-align: top; text-align: center; font-family: courier new;"><RuntimeException>generic(run)</td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_ERASURE_MATCH</big></small></small></td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">false</span></small> </td> > </tr> > </tbody> ></table> ><br> ><h1><br> ></h1> ><h3>Search for methods with parameterized (or raw) types parameters >and/or parameterized (or raw) return type</h3> ><h4>Declarations</h4> ><ul> > <li>matches to declaration of generic methods are always R_FULL_MATCH</li> ></ul> ><ul> ></ul> ><h4>References</h4> >Currently, R_ERASURE_MATCH or R_EQUIVALENT_MATCH modes have no effect >on this kind of search (1). If it appears an interesting mode to filter >matches, it will be >implemented in further version...<br> ><table style="text-align: left; width: 1237px; height: 99px;" border="1" > cellpadding="1" cellspacing="1"> > <tbody> > <tr> > <td rowspan="2" colspan="1" > style="vertical-align: top; background-color: rgb(204, 204, 204); text-align: center; font-family: arial; font-weight: bold;"><br> >String search pattern</td> > <td colspan="1" rowspan="2" > style="vertical-align: top; font-weight: bold; text-align: center; font-family: arial; background-color: rgb(204, 204, 204);"><br> >Code </td> > <td colspan="2" rowspan="1" > style="vertical-align: top; text-align: center; background-color: rgb(204, 204, 204);"><span > style="font-weight: bold; font-family: arial;">SearchMatch</span><br> > </td> > </tr> > <tr> > <td > style="vertical-align: top; font-weight: bold; text-align: center; font-family: arial; background-color: rgb(204, 204, 204);">Rule<br> > <small><code>SearchPattern.R_...</code></small><br> > </td> > <td > style="vertical-align: top; text-align: center; background-color: rgb(204, 204, 204);"><span > style="font-family: arial; font-weight: bold;">Raw<br> > </span> </td> > </tr> > <tr> > <td > style="vertical-align: top; text-align: center; font-weight: bold;" > colspan="1" rowspan="4"><code><br> >paramTypesArgs<br> > </code><code><span > style="font-family: arial; font-style: italic; font-weight: normal;">or</span></code><br> > <code>paramTypesArgs(Single</code><code>)<br> > <span > style="font-family: arial; font-style: italic; font-weight: normal;">or</span><br> > </code><code>paramTypesArgs(Single</code><code><Exception>)<br> > </code><code><span > style="font-family: arial; font-style: italic; font-weight: normal;">(1)</span><br> > </code><br> > </td> > <td > style="vertical-align: top; text-align: center; font-family: courier new;"><small><span > style="font-style: italic;"></span><span style="font-weight: bold;"></span></small>new >Single().<br> >paramTypesArgs(gs); </td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_FULL_MATCH</big></small></small> > </td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">true</span></small></td> > </tr> > <tr> > <td > style="vertical-align: top; text-align: center; font-family: courier new;">new >Single<Object>().<br> >paramTypesArgs(gs);</td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_FULL_MATCH</big></small></small></td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">false</span></small></td> > </tr> > <tr> > <td > style="vertical-align: top; text-align: center; font-family: courier new;">new >Single<Exception>().<br> >paramTypesArgs(gs);</td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_FULL_MATCH</big></small></small></td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">false</span></small></td> > </tr> > <tr> > <td > style="vertical-align: top; text-align: center; font-family: courier new;">new >Single<RuntimeException>().<br> >paramTypesArgs(gs);</td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_FULL_MATCH</big></small></small></td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">false</span></small> </td> > </tr> > <tr> > <td > style="background-color: rgb(192, 192, 192); font-weight: bold;"><code><br> > </code> </td> > <td style="background-color: rgb(192, 192, 192);"><br> > </td> > <td style="background-color: rgb(192, 192, 192);"><br> > </td> > <td style="background-color: rgb(192, 192, 192);"><br> > </td> > </tr> > <tr> > <td > style="vertical-align: top; text-align: center; font-weight: bold;" > colspan="1" rowspan="4"><br> > <code>Single.paramTypesArgs</code><br> > <span > style="font-family: arial; font-style: italic; font-weight: normal;">or</span><br> > <code>Single.paramTypesArgs(Single)</code><br> > <span > style="font-family: arial; font-style: italic; font-weight: normal;">or</span><br> > <code>Single.paramTypesArgs(Single<Exception>)</code><br> > <span > style="font-family: arial; font-style: italic; font-weight: normal;">(1)</span><br> > </td> > <td > style="vertical-align: top; text-align: center; font-family: courier new;"><small><span > style="font-style: italic;"></span><span style="font-weight: bold;"></span></small>new >Single().<br> >paramTypesArgs(gs); </td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_FULL_MATCH</big></small></small> > </td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">true</span></small></td> > </tr> > <tr> > <td > style="vertical-align: top; text-align: center; font-family: courier new;">new >Single<Object>().<br> >paramTypesArgs(gs);</td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_EQUIVALENT_MATCH</big></small></small></td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">false</span></small></td> > </tr> > <tr> > <td > style="vertical-align: top; text-align: center; font-family: courier new;">new >Single<Exception>().<br> >paramTypesArgs(gs);</td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_</big></small></small><small><small><big>EQUIVALENT</big></small></small><small><small><big>_MATCH</big></small></small></td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">false</span></small></td> > </tr> > <tr> > <td > style="vertical-align: top; text-align: center; font-family: courier new;">new >Single<RuntimeException>().<br> >paramTypesArgs(gs);</td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_</big></small></small><small><small><big>EQUIVALENT</big></small></small><small><small><big>_MATCH</big></small></small></td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">false</span></small> </td> > </tr> > <tr> > <td > style="background-color: rgb(192, 192, 192); font-weight: bold;"><code><br> > </code> </td> > <td style="background-color: rgb(192, 192, 192);"><br> > </td> > <td style="background-color: rgb(192, 192, 192);"><br> > </td> > <td style="background-color: rgb(192, 192, 192);"><br> > </td> > </tr> > <tr> > <td > style="vertical-align: top; text-align: center; font-weight: bold;" > colspan="1" rowspan="4"><br> > <code>Single<Exception>.paramTypesArgs</code><br> > <span > style="font-family: arial; font-style: italic; font-weight: normal;">or</span><br> > <code>Single</code><code><Exception></code><code>.paramTypesArgs(Single)</code><br> > <span > style="font-family: arial; font-style: italic; font-weight: normal;">or</span><br> > <code>Single</code><code><Exception></code><code>.paramTypesArgs(Single<Exception>)</code><br> > <span > style="font-family: arial; font-style: italic; font-weight: normal;">(1)</span><br> > </td> > <td > style="vertical-align: top; text-align: center; font-family: courier new;"><small><span > style="font-style: italic;"></span><span style="font-weight: bold;"></span></small>new >Single().<br> >paramTypesArgs(gs); </td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_EQUIVALENT_MATCH</big></small></small> > </td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">true</span></small></td> > </tr> > <tr> > <td > style="vertical-align: top; text-align: center; font-family: courier new;">new >Single<Object>().<br> >paramTypesArgs(gs);</td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_ERASURE_MATCH</big></small></small></td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">false</span></small></td> > </tr> > <tr> > <td > style="vertical-align: top; text-align: center; font-family: courier new;">new >Single<Exception>().<br> >paramTypesArgs(gs);</td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_</big></small></small><small><small><big>FULL</big></small></small><small><small><big>_MATCH</big></small></small></td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">false</span></small></td> > </tr> > <tr> > <td > style="vertical-align: top; text-align: center; font-family: courier new;">new >Single<RuntimeException>().<br> >paramTypesArgs(gs);</td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_</big></small></small><small><small><big>ERASURE</big></small></small><small><small><big>_MATCH</big></small></small></td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">false</span></small> </td> > </tr> > <tr> > <td > style="background-color: rgb(192, 192, 192); font-weight: bold;"><code><br> > </code> </td> > <td style="background-color: rgb(192, 192, 192);"><br> > </td> > <td style="background-color: rgb(192, 192, 192);"><br> > </td> > <td style="background-color: rgb(192, 192, 192);"><br> > </td> > </tr> > <tr> > <td > style="vertical-align: top; text-align: center; font-weight: bold;" > colspan="1" rowspan="4"><br> > <code>Single<? extends Exception>.paramTypesArgs</code><br> > <span > style="font-family: arial; font-style: italic; font-weight: normal;">or</span><br> > <code>Single<? extends </code><code>Exception></code><code>.paramTypesArgs(Single)</code><br> > <span > style="font-family: arial; font-style: italic; font-weight: normal;">or</span><br> > <code>Single<? extends </code><code>Exception></code><code>.paramTypesArgs(Single<Exception>)</code><br> > <span > style="font-family: arial; font-style: italic; font-weight: normal;">(1)</span><br> > </td> > <td > style="vertical-align: top; text-align: center; font-family: courier new;"><small><span > style="font-style: italic;"></span><span style="font-weight: bold;"></span></small>new >Single().<br> >paramTypesArgs(gs); </td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_EQUIVALENT_MATCH</big></small></small> > </td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">true</span></small></td> > </tr> > <tr> > <td > style="vertical-align: top; text-align: center; font-family: courier new;">new >Single<Object>().<br> >paramTypesArgs(gs);</td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_ERASURE_MATCH</big></small></small></td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">false</span></small></td> > </tr> > <tr> > <td > style="vertical-align: top; text-align: center; font-family: courier new;">new >Single<Exception>().<br> >paramTypesArgs(gs);</td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_EQUIVALENT_MATCH</big></small></small></td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">false</span></small></td> > </tr> > <tr> > <td > style="vertical-align: top; text-align: center; font-family: courier new;">new >Single<RuntimeException>().<br> >paramTypesArgs(gs);</td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_EQUIVALENT_MATCH</big></small></small></td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">false</span></small> </td> > </tr> > </tbody> ></table> ><br> ><em>Note: it is >not possible to have extends clause while using IJavaElement search >pattern >as syntax does not allow it in code.</em><br> ><table style="text-align: left; width: 1237px; height: 99px;" border="1" > cellpadding="1" cellspacing="1"> > <tbody> > <tr> > <td rowspan="2" colspan="1" > style="vertical-align: top; background-color: rgb(204, 204, 204); text-align: center; font-family: arial; font-weight: bold;"><br> >IJavaElement search pattern</td> > <td colspan="1" rowspan="2" > style="vertical-align: top; font-weight: bold; text-align: center; font-family: arial; background-color: rgb(204, 204, 204);"><br> >Code </td> > <td colspan="2" rowspan="1" > style="vertical-align: top; text-align: center; background-color: rgb(204, 204, 204);"><span > style="font-weight: bold; font-family: arial;">SearchMatch</span><br> > </td> > </tr> > <tr> > <td > style="vertical-align: top; font-weight: bold; text-align: center; font-family: arial; background-color: rgb(204, 204, 204);">Rule<br> > <small><code>SearchPattern.R_...</code></small><br> > </td> > <td > style="vertical-align: top; text-align: center; background-color: rgb(204, 204, 204);"><span > style="font-family: arial; font-weight: bold;">Raw<br> > </span> </td> > </tr> > <tr> > <td colspan="1" rowspan="4" > style="vertical-align: top; text-align: center; font-family: courier new; font-weight: bold;"><br> > <span style="font-style: italic;">new Single().</span><br> >paramTypesArgs(null);<br> > </td> > <td > style="vertical-align: top; text-align: center; font-family: courier new;">new >Single().<br> >paramTypesArgs(gs); </td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_FULL_MATCH</big></small></small><br> > </td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">true</span></small></td> > </tr> > <tr> > <td > style="vertical-align: top; text-align: center; font-family: courier new;">new >Single<Object>().<br> >paramTypesArgs(gs);</td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_EQUIVALENT_MATCH</big></small></small></td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">false</span></small></td> > </tr> > <tr> > <td > style="vertical-align: top; text-align: center; font-family: courier new;">new >Single<Exception>().<br> >paramTypesArgs(gs);</td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_EQUIVALENT_MATCH</big></small></small></td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">false</span></small></td> > </tr> > <tr> > <td > style="vertical-align: top; text-align: center; font-family: courier new;">new >Single<RuntimeException>().<br> >paramTypesArgs(gs);</td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_EQUIVALENT_MATCH</big></small></small></td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">false</span></small> </td> > </tr> > <tr> > <td style="background-color: rgb(192, 192, 192);"><br> > </td> > <td style="background-color: rgb(192, 192, 192);"><br> > </td> > <td style="background-color: rgb(192, 192, 192);"><br> > </td> > <td style="background-color: rgb(192, 192, 192);"><br> > </td> > </tr> > <tr> > <td colspan="1" rowspan="4" > style="vertical-align: top; text-align: center; font-family: courier new; font-weight: bold;"><br> > <span style="font-style: italic;">new Single<Exception>().</span><br> >paramTypesArgs(new Single<Exception>());<br> > </td> > <td > style="vertical-align: top; text-align: center; font-family: courier new;">new >Single().<br> >paramTypesArgs(gs); </td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_EQUIVALENT_MATCH</big></small></small></td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">true</span></small></td> > </tr> > <tr> > <td > style="vertical-align: top; text-align: center; font-family: courier new;">new >Single<Object>().<br> >paramTypesArgs(gs);</td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_ERASURE_MATCH</big></small></small></td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">false</span></small></td> > </tr> > <tr> > <td > style="vertical-align: top; text-align: center; font-family: courier new;">new >Single<Exception>().<br> >paramTypesArgs(gs);</td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_FULL_MATCH</big></small></small></td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">false</span></small></td> > </tr> > <tr> > <td > style="vertical-align: top; text-align: center; font-family: courier new;">new >Single<RuntimeException>().<br> >paramTypesArgs(gs);</td> > <td > style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_ERASURE_MATCH</big></small></small></td> > <td > style="vertical-align: top; text-align: center; font-weight: bold;"><small><span > style="font-family: arial;">false</span></small> </td> > </tr> > </tbody> ></table> ><br> ><br> ></body> ></html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> <title>Java Search Engine behavior for generic methods and constructors</title> </head> <body> <h3>Sample for parameterized methods</h3> Assuming that we have following code:<br> <code> public class Single<T> {<br> public <U> void generic(U u) {}<br> public void paramTypesArgs(Single<T> gst) {}<br> }<br> <br> public class RefSingle {<br> void testObject() {<br> Single<Object> gs = new Single<Object>();<br> gs.<Object>generic(new Object());<br> gs.paramTypesArgs(gs);<br> }<br> void testException() {<br> Single<Exception> gs = new Single<Exception>();<br> gs.<Exception>generic(new Exception());<br> gs.paramTypesArgs(gs);<br> }<br> void testRuntimeException() {<br> Single<RuntimeException>gs = new Single<RuntimeException>();<br> gs.<RuntimeException>generic(new RuntimeException());<br> gs.paramTypesArgs(gs);<br> }<br> void testRaw() {<br> Single gs = new Single();<br> gs.generic(new Exception());<br> gs.paramTypesArgs(gs);<br> }<br> }<br> </code> <br> <h3>Search for generic methods</h3> <h4>Example of pattern<br> </h4> A sample of pattern to search generic method is: <code><U>generic(U)</code>.<br> <em><br> Note: it is not possible to perform this kind of search using dialog. In search dialog string, all types specified between <> are considered as type arguments and not as type parameters.</em> <h4>Declarations</h4> <ul> <li> declaration matches to generic methods are always R_EXACT_MATCH</li> </ul> <ul> </ul> <h4>References</h4> <ul> <li>reference matches to generic methods are always R_ERASURE_MATCH</li> </ul> <ul> </ul> <h3>Search for parameterized or raw methods</h3> <ul> </ul> <h4>Search pattern mode<br> </h4> <code>R_ERASURE_MATCH</code> <ul> <li>find all exact, compatible or with same erasure matches which will be erasure (ie. <code>isErasure()</code> will answer <code>true</code>).</li> <li>selection is always just erasure name (for example: <code>generic("")</code>).</li> </ul> <code>R_EQUIVALENT_MATCH</code> <ul> <li>find all exact or compatible matches which will be erasure and equivalent (ie. <code>isErasure()</code> and <code>isEquivalent()</code> will both answer <code>true</code>). </li> <li>selection is the entire reference including type arguments only if both pattern and match have ones (for example: <code><String>generic("")</code>).<br> Otherwise, only method selector and parameters are selected (for example: <code>generic("")</code>).</li> </ul> <code>R_FULL_MATCH</code> <ul> <li>find all exact matches. Corresponding matches will be erasure, equivalent and exact (ie. <code>isErasure()</code>, <code>isEquivalent()</code>and <code>isExact()</code>will all answer <code>true</code>). </li> <li>selection is the entire reference including type arguments only if both pattern and match have ones (for example: <code><String>generic("")</code>).<br> Otherwise, only method selector and parameters are selected (for example: <code>generic("")</code>).</li> </ul> <ul> </ul> <h4>Declarations</h4> <ul> <li>matches to declaration of generic methods are always R_EXACT_MATCH</li> </ul> <ul> </ul> <h4>References</h4> <table style="text-align: left; width: 1237px; height: 99px;" border="1" cellpadding="1" cellspacing="1"> <tbody> <tr> <td rowspan="2" colspan="1" style="vertical-align: top; background-color: rgb(204, 204, 204); text-align: center; font-family: arial; font-weight: bold;">String search pattern</td> <td colspan="1" rowspan="2" style="vertical-align: top; font-weight: bold; text-align: center; font-family: arial; background-color: rgb(204, 204, 204);"><br> Code </td> <td colspan="2" rowspan="1" style="vertical-align: top; text-align: center; background-color: rgb(204, 204, 204);"><span style="font-weight: bold; font-family: arial;">SearchMatch</span><br> </td> </tr> <tr> <td style="vertical-align: top; font-weight: bold; text-align: center; font-family: arial; background-color: rgb(204, 204, 204);">Rule<br> <small><code>SearchPattern.R_...</code></small><br> </td> <td style="vertical-align: top; text-align: center; background-color: rgb(204, 204, 204);"><span style="font-family: arial; font-weight: bold;">Raw<br> </span> </td> </tr> <tr> <td colspan="1" rowspan="4" style="vertical-align: top; text-align: center; font-family: courier new; font-weight: bold;"><br> generic<br> </td> <td style="vertical-align: top; text-align: center; font-family: courier new;"><small><span style="font-style: italic;"></span><span style="font-weight: bold;"></span></small>generic(exc)<br> </td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_FULL_MATCH</big></small></small> </td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">true</span></small></td> </tr> <tr> <td style="vertical-align: top; text-align: center; font-family: courier new;"><Object>generic(obj)</td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_FULL_MATCH</big></small></small></td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">false</span></small></td> </tr> <tr> <td style="vertical-align: top; text-align: center; font-family: courier new;"><Exception>generic(exc)</td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_FULL_MATCH</big></small></small></td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">false</span></small></td> </tr> <tr> <td style="vertical-align: top; text-align: center; font-family: courier new;"><RuntimeException>generic(run)</td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_FULL_MATCH</big></small></small></td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">false</span></small> </td> </tr> <tr> <td style="background-color: rgb(192, 192, 192);"><br> </td> <td style="background-color: rgb(192, 192, 192);"><br> </td> <td style="background-color: rgb(192, 192, 192);"><br> </td> <td style="background-color: rgb(192, 192, 192);"><br> </td> </tr> <tr> <td rowspan="1" style="vertical-align: top; text-align: center; font-family: arial; font-weight: bold;"><code><Exception>generic(Exception)</code></td> <td style="vertical-align: top; text-align: center; font-family: courier new;"><Exception>generic(exc)</td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_FULL_MATCH</big></small></small></td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">false</span></small></td> </tr> <tr> <td style="background-color: rgb(192, 192, 192);"><br> </td> <td style="background-color: rgb(192, 192, 192);"><br> </td> <td style="background-color: rgb(192, 192, 192);"><br> </td> <td style="background-color: rgb(192, 192, 192);"><br> </td> </tr> <tr> <td colspan="1" rowspan="4" style="vertical-align: top; text-align: center; font-family: courier new; font-weight: bold;"><br> <br> <U>generic(U)<br> </td> <td style="vertical-align: top; text-align: center; font-family: courier new;">generic(exc)<br> </td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_EQUIVALENT_MATCH</big></small></small></td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">true</span></small></td> </tr> <tr> <td style="vertical-align: top; text-align: center; font-family: courier new;"><Object>generic(obj)</td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_FULL_MATCH</big></small></small></td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">false</span></small></td> </tr> <tr> <td style="vertical-align: top; text-align: center; font-family: courier new;"><Exception>generic(exc)</td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_FULL_MATCH</big></small></small></td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">false</span></small></td> </tr> <tr> <td style="vertical-align: top; text-align: center; font-family: courier new;"><RuntimeException>generic(run)</td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_FULL_MATCH</big></small></small></td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">false</span></small> </td> </tr> <tr> <td style="background-color: rgb(192, 192, 192);"><br> </td> <td style="background-color: rgb(192, 192, 192);"><br> </td> <td style="background-color: rgb(192, 192, 192);"><br> </td> <td style="background-color: rgb(192, 192, 192);"><br> </td> </tr> <tr> <td rowspan="1" style="vertical-align: top; text-align: center; font-family: arial; font-weight: bold;"><code><? extends Exception>generic(Exception)</code></td> <td style="vertical-align: top; text-align: center; font-family: courier new;"><Exception>generic(exc)</td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_EQUIVALENT_MATCH</big></small></small></td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">false</span></small></td> </tr> <tr> <td style="background-color: rgb(192, 192, 192);"><br> </td> <td style="background-color: rgb(192, 192, 192);"><br> </td> <td style="background-color: rgb(192, 192, 192);"><br> </td> <td style="background-color: rgb(192, 192, 192);"><br> </td> </tr> <tr> <td colspan="1" rowspan="4" style="vertical-align: top; text-align: center; font-family: courier new; font-weight: bold;"><br> <br> <? extends Exception>generic(U)<br> </td> <td style="vertical-align: top; text-align: center; font-family: courier new;">generic(exc)<br> </td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_EQUIVALENT_MATCH</big></small></small></td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">true</span></small></td> </tr> <tr> <td style="vertical-align: top; text-align: center; font-family: courier new;"><Object>generic(obj)</td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_ERASURE_MATCH</big></small></small></td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">false</span></small></td> </tr> <tr> <td style="vertical-align: top; text-align: center; font-family: courier new;"><Exception>generic(exc)</td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_</big></small></small><small><small><big>EQUIVALENT</big></small></small><small><small><big>_MATCH</big></small></small></td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">false</span></small></td> </tr> <tr> <td style="vertical-align: top; text-align: center; font-family: courier new;"><RuntimeException>generic(run)</td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_EQUIVALENT_MATCH</big></small></small></td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">false</span></small> </td> </tr> </tbody> </table> <br> <em>Note: it is not possible to have extends clause while using IJavaElement search pattern as syntax does not allow it in code.</em><br> <table style="text-align: left; width: 1237px; height: 99px;" border="1" cellpadding="1" cellspacing="1"> <tbody> <tr> <td rowspan="2" colspan="1" style="vertical-align: top; background-color: rgb(204, 204, 204); text-align: center; font-family: arial; font-weight: bold;"><br> IJavaElement search pattern</td> <td colspan="1" rowspan="2" style="vertical-align: top; font-weight: bold; text-align: center; font-family: arial; background-color: rgb(204, 204, 204);"><br> Code </td> <td colspan="2" rowspan="1" style="vertical-align: top; text-align: center; background-color: rgb(204, 204, 204);"><span style="font-weight: bold; font-family: arial;">SearchMatch</span><br> </td> </tr> <tr> <td style="vertical-align: top; font-weight: bold; text-align: center; font-family: arial; background-color: rgb(204, 204, 204);">Rule<br> <small><code>SearchPattern.R_...</code></small><br> </td> <td style="vertical-align: top; text-align: center; background-color: rgb(204, 204, 204);"><span style="font-family: arial; font-weight: bold;">Raw<br> </span> </td> </tr> <tr> <td colspan="1" rowspan="4" style="vertical-align: top; text-align: center; font-family: courier new; font-weight: bold;"><br> generic(null);<br> </td> <td style="vertical-align: top; text-align: center; font-family: courier new;">generic(exc)<br> </td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_FULL_MATCH</big></small></small><br> </td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">true</span></small></td> </tr> <tr> <td style="vertical-align: top; text-align: center; font-family: courier new;"><Object>generic(obj)</td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_EQUIVALENT_MATCH</big></small></small></td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">false</span></small></td> </tr> <tr> <td style="vertical-align: top; text-align: center; font-family: courier new;"><Exception>generic(exc)</td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_EQUIVALENT_MATCH</big></small></small></td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">false</span></small></td> </tr> <tr> <td style="vertical-align: top; text-align: center; font-family: courier new;"><RuntimeException>generic(run)</td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_EQUIVALENT_MATCH</big></small></small></td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">false</span></small> </td> </tr> <tr> <td style="background-color: rgb(192, 192, 192); font-weight: bold;"><br> </td> <td style="background-color: rgb(192, 192, 192);"><br> </td> <td style="background-color: rgb(192, 192, 192);"><br> </td> <td style="background-color: rgb(192, 192, 192);"><br> </td> </tr> <tr> <td colspan="1" rowspan="4" style="vertical-align: top; text-align: center; font-family: courier new; font-weight: bold;"><br> <br> <Exception>generic(exc);<br> </td> <td style="vertical-align: top; text-align: center; font-family: courier new;">generic(exc)<br> </td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_EQUIVALENT_MATCH</big></small></small></td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">true</span></small></td> </tr> <tr> <td style="vertical-align: top; text-align: center; font-family: courier new;"><Object>generic(obj)</td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_ERASURE_MATCH</big></small></small></td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">false</span></small></td> </tr> <tr> <td style="vertical-align: top; text-align: center; font-family: courier new;"><Exception>generic(exc)</td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_FULL_MATCH</big></small></small></td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">false</span></small></td> </tr> <tr> <td style="vertical-align: top; text-align: center; font-family: courier new;"><RuntimeException>generic(run)</td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_ERASURE_MATCH</big></small></small></td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">false</span></small> </td> </tr> </tbody> </table> <br> <h1><br> </h1> <h3>Search for methods with parameterized (or raw) types parameters and/or parameterized (or raw) return type</h3> <h4>Declarations</h4> <ul> <li>matches to declaration of generic methods are always R_FULL_MATCH</li> </ul> <ul> </ul> <h4>References</h4> Currently, R_ERASURE_MATCH or R_EQUIVALENT_MATCH modes have no effect on this kind of search (1). If it appears an interesting mode to filter matches, it will be implemented in further version...<br> <table style="text-align: left; width: 1237px; height: 99px;" border="1" cellpadding="1" cellspacing="1"> <tbody> <tr> <td rowspan="2" colspan="1" style="vertical-align: top; background-color: rgb(204, 204, 204); text-align: center; font-family: arial; font-weight: bold;"><br> String search pattern</td> <td colspan="1" rowspan="2" style="vertical-align: top; font-weight: bold; text-align: center; font-family: arial; background-color: rgb(204, 204, 204);"><br> Code </td> <td colspan="2" rowspan="1" style="vertical-align: top; text-align: center; background-color: rgb(204, 204, 204);"><span style="font-weight: bold; font-family: arial;">SearchMatch</span><br> </td> </tr> <tr> <td style="vertical-align: top; font-weight: bold; text-align: center; font-family: arial; background-color: rgb(204, 204, 204);">Rule<br> <small><code>SearchPattern.R_...</code></small><br> </td> <td style="vertical-align: top; text-align: center; background-color: rgb(204, 204, 204);"><span style="font-family: arial; font-weight: bold;">Raw<br> </span> </td> </tr> <tr> <td style="vertical-align: top; text-align: center; font-weight: bold;" colspan="1" rowspan="4"><code><br> paramTypesArgs<br> </code><code><span style="font-family: arial; font-style: italic; font-weight: normal;">or</span></code><br> <code>paramTypesArgs(Single</code><code>)<br> <span style="font-family: arial; font-style: italic; font-weight: normal;">or</span><br> </code><code>paramTypesArgs(Single</code><code><Exception>)<br> </code><code><span style="font-family: arial; font-style: italic; font-weight: normal;">(1)</span><br> </code><br> </td> <td style="vertical-align: top; text-align: center; font-family: courier new;"><small><span style="font-style: italic;"></span><span style="font-weight: bold;"></span></small>new Single().<br> paramTypesArgs(gs); </td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_FULL_MATCH</big></small></small> </td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">true</span></small></td> </tr> <tr> <td style="vertical-align: top; text-align: center; font-family: courier new;">new Single<Object>().<br> paramTypesArgs(gs);</td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_FULL_MATCH</big></small></small></td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">false</span></small></td> </tr> <tr> <td style="vertical-align: top; text-align: center; font-family: courier new;">new Single<Exception>().<br> paramTypesArgs(gs);</td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_FULL_MATCH</big></small></small></td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">false</span></small></td> </tr> <tr> <td style="vertical-align: top; text-align: center; font-family: courier new;">new Single<RuntimeException>().<br> paramTypesArgs(gs);</td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_FULL_MATCH</big></small></small></td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">false</span></small> </td> </tr> <tr> <td style="background-color: rgb(192, 192, 192); font-weight: bold;"><code><br> </code> </td> <td style="background-color: rgb(192, 192, 192);"><br> </td> <td style="background-color: rgb(192, 192, 192);"><br> </td> <td style="background-color: rgb(192, 192, 192);"><br> </td> </tr> <tr> <td style="vertical-align: top; text-align: center; font-weight: bold;" colspan="1" rowspan="4"><br> <code>Single.paramTypesArgs</code><br> <span style="font-family: arial; font-style: italic; font-weight: normal;">or</span><br> <code>Single.paramTypesArgs(Single)</code><br> <span style="font-family: arial; font-style: italic; font-weight: normal;">or</span><br> <code>Single.paramTypesArgs(Single<Exception>)</code><br> <span style="font-family: arial; font-style: italic; font-weight: normal;">(1)</span><br> </td> <td style="vertical-align: top; text-align: center; font-family: courier new;"><small><span style="font-style: italic;"></span><span style="font-weight: bold;"></span></small>new Single().<br> paramTypesArgs(gs); </td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_FULL_MATCH</big></small></small> </td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">true</span></small></td> </tr> <tr> <td style="vertical-align: top; text-align: center; font-family: courier new;">new Single<Object>().<br> paramTypesArgs(gs);</td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_EQUIVALENT_MATCH</big></small></small></td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">false</span></small></td> </tr> <tr> <td style="vertical-align: top; text-align: center; font-family: courier new;">new Single<Exception>().<br> paramTypesArgs(gs);</td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_</big></small></small><small><small><big>EQUIVALENT</big></small></small><small><small><big>_MATCH</big></small></small></td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">false</span></small></td> </tr> <tr> <td style="vertical-align: top; text-align: center; font-family: courier new;">new Single<RuntimeException>().<br> paramTypesArgs(gs);</td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_</big></small></small><small><small><big>EQUIVALENT</big></small></small><small><small><big>_MATCH</big></small></small></td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">false</span></small> </td> </tr> <tr> <td style="background-color: rgb(192, 192, 192); font-weight: bold;"><code><br> </code> </td> <td style="background-color: rgb(192, 192, 192);"><br> </td> <td style="background-color: rgb(192, 192, 192);"><br> </td> <td style="background-color: rgb(192, 192, 192);"><br> </td> </tr> <tr> <td style="vertical-align: top; text-align: center; font-weight: bold;" colspan="1" rowspan="4"><br> <code>Single<Exception>.paramTypesArgs</code><br> <span style="font-family: arial; font-style: italic; font-weight: normal;">or</span><br> <code>Single</code><code><Exception></code><code>.paramTypesArgs(Single)</code><br> <span style="font-family: arial; font-style: italic; font-weight: normal;">or</span><br> <code>Single</code><code><Exception></code><code>.paramTypesArgs(Single<Exception>)</code><br> <span style="font-family: arial; font-style: italic; font-weight: normal;">(1)</span><br> </td> <td style="vertical-align: top; text-align: center; font-family: courier new;"><small><span style="font-style: italic;"></span><span style="font-weight: bold;"></span></small>new Single().<br> paramTypesArgs(gs); </td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_EQUIVALENT_MATCH</big></small></small> </td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">true</span></small></td> </tr> <tr> <td style="vertical-align: top; text-align: center; font-family: courier new;">new Single<Object>().<br> paramTypesArgs(gs);</td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_ERASURE_MATCH</big></small></small></td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">false</span></small></td> </tr> <tr> <td style="vertical-align: top; text-align: center; font-family: courier new;">new Single<Exception>().<br> paramTypesArgs(gs);</td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_</big></small></small><small><small><big>FULL</big></small></small><small><small><big>_MATCH</big></small></small></td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">false</span></small></td> </tr> <tr> <td style="vertical-align: top; text-align: center; font-family: courier new;">new Single<RuntimeException>().<br> paramTypesArgs(gs);</td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_</big></small></small><small><small><big>ERASURE</big></small></small><small><small><big>_MATCH</big></small></small></td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">false</span></small> </td> </tr> <tr> <td style="background-color: rgb(192, 192, 192); font-weight: bold;"><code><br> </code> </td> <td style="background-color: rgb(192, 192, 192);"><br> </td> <td style="background-color: rgb(192, 192, 192);"><br> </td> <td style="background-color: rgb(192, 192, 192);"><br> </td> </tr> <tr> <td style="vertical-align: top; text-align: center; font-weight: bold;" colspan="1" rowspan="4"><br> <code>Single<? extends Exception>.paramTypesArgs</code><br> <span style="font-family: arial; font-style: italic; font-weight: normal;">or</span><br> <code>Single<? extends </code><code>Exception></code><code>.paramTypesArgs(Single)</code><br> <span style="font-family: arial; font-style: italic; font-weight: normal;">or</span><br> <code>Single<? extends </code><code>Exception></code><code>.paramTypesArgs(Single<Exception>)</code><br> <span style="font-family: arial; font-style: italic; font-weight: normal;">(1)</span><br> </td> <td style="vertical-align: top; text-align: center; font-family: courier new;"><small><span style="font-style: italic;"></span><span style="font-weight: bold;"></span></small>new Single().<br> paramTypesArgs(gs); </td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_EQUIVALENT_MATCH</big></small></small> </td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">true</span></small></td> </tr> <tr> <td style="vertical-align: top; text-align: center; font-family: courier new;">new Single<Object>().<br> paramTypesArgs(gs);</td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_ERASURE_MATCH</big></small></small></td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">false</span></small></td> </tr> <tr> <td style="vertical-align: top; text-align: center; font-family: courier new;">new Single<Exception>().<br> paramTypesArgs(gs);</td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_EQUIVALENT_MATCH</big></small></small></td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">false</span></small></td> </tr> <tr> <td style="vertical-align: top; text-align: center; font-family: courier new;">new Single<RuntimeException>().<br> paramTypesArgs(gs);</td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_EQUIVALENT_MATCH</big></small></small></td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">false</span></small> </td> </tr> </tbody> </table> <br> <em>Note: it is not possible to have extends clause while using IJavaElement search pattern as syntax does not allow it in code.</em><br> <table style="text-align: left; width: 1237px; height: 99px;" border="1" cellpadding="1" cellspacing="1"> <tbody> <tr> <td rowspan="2" colspan="1" style="vertical-align: top; background-color: rgb(204, 204, 204); text-align: center; font-family: arial; font-weight: bold;"><br> IJavaElement search pattern</td> <td colspan="1" rowspan="2" style="vertical-align: top; font-weight: bold; text-align: center; font-family: arial; background-color: rgb(204, 204, 204);"><br> Code </td> <td colspan="2" rowspan="1" style="vertical-align: top; text-align: center; background-color: rgb(204, 204, 204);"><span style="font-weight: bold; font-family: arial;">SearchMatch</span><br> </td> </tr> <tr> <td style="vertical-align: top; font-weight: bold; text-align: center; font-family: arial; background-color: rgb(204, 204, 204);">Rule<br> <small><code>SearchPattern.R_...</code></small><br> </td> <td style="vertical-align: top; text-align: center; background-color: rgb(204, 204, 204);"><span style="font-family: arial; font-weight: bold;">Raw<br> </span> </td> </tr> <tr> <td colspan="1" rowspan="4" style="vertical-align: top; text-align: center; font-family: courier new; font-weight: bold;"><br> <span style="font-style: italic;">new Single().</span><br> paramTypesArgs(null);<br> </td> <td style="vertical-align: top; text-align: center; font-family: courier new;">new Single().<br> paramTypesArgs(gs); </td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_FULL_MATCH</big></small></small><br> </td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">true</span></small></td> </tr> <tr> <td style="vertical-align: top; text-align: center; font-family: courier new;">new Single<Object>().<br> paramTypesArgs(gs);</td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_EQUIVALENT_MATCH</big></small></small></td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">false</span></small></td> </tr> <tr> <td style="vertical-align: top; text-align: center; font-family: courier new;">new Single<Exception>().<br> paramTypesArgs(gs);</td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_EQUIVALENT_MATCH</big></small></small></td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">false</span></small></td> </tr> <tr> <td style="vertical-align: top; text-align: center; font-family: courier new;">new Single<RuntimeException>().<br> paramTypesArgs(gs);</td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_EQUIVALENT_MATCH</big></small></small></td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">false</span></small> </td> </tr> <tr> <td style="background-color: rgb(192, 192, 192);"><br> </td> <td style="background-color: rgb(192, 192, 192);"><br> </td> <td style="background-color: rgb(192, 192, 192);"><br> </td> <td style="background-color: rgb(192, 192, 192);"><br> </td> </tr> <tr> <td colspan="1" rowspan="4" style="vertical-align: top; text-align: center; font-family: courier new; font-weight: bold;"><br> <span style="font-style: italic;">new Single<Exception>().</span><br> paramTypesArgs(new Single<Exception>());<br> </td> <td style="vertical-align: top; text-align: center; font-family: courier new;">new Single().<br> paramTypesArgs(gs); </td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_EQUIVALENT_MATCH</big></small></small></td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">true</span></small></td> </tr> <tr> <td style="vertical-align: top; text-align: center; font-family: courier new;">new Single<Object>().<br> paramTypesArgs(gs);</td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_ERASURE_MATCH</big></small></small></td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">false</span></small></td> </tr> <tr> <td style="vertical-align: top; text-align: center; font-family: courier new;">new Single<Exception>().<br> paramTypesArgs(gs);</td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_FULL_MATCH</big></small></small></td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">false</span></small></td> </tr> <tr> <td style="vertical-align: top; text-align: center; font-family: courier new;">new Single<RuntimeException>().<br> paramTypesArgs(gs);</td> <td style="vertical-align: top; text-align: center; font-family: arial;"><small><small><big>R_ERASURE_MATCH</big></small></small></td> <td style="vertical-align: top; text-align: center; font-weight: bold;"><small><span style="font-family: arial;">false</span></small> </td> </tr> </tbody> </table> <br> <br> </body> </html>
View Attachment As Raw
Actions:
View
Attachments on
bug 81377
:
18345
| 18347