public class Single<T> {
public <U> void generic(U u) {}
public void paramTypesArgs(Single<T> gst) {}
}
public class RefSingle {
void testObject() {
Single<Object> gs = new
Single<Object>();
gs.<Object>generic(new
Object());
gs.paramTypesArgs(gs);
}
void testException() {
Single<Exception> gs = new
Single<Exception>();
gs.<Exception>generic(new
Exception());
gs.paramTypesArgs(gs);
}
void testRuntimeException() {
Single<RuntimeException>gs = new
Single<RuntimeException>();
gs.<RuntimeException>generic(new
RuntimeException());
gs.paramTypesArgs(gs);
}
void testRaw() {
Single gs = new Single();
gs.generic(new Exception());
gs.paramTypesArgs(gs);
}
}
<U>generic(U)
.R_ERASURE_MATCH
isErasure()
will answer true
).generic("")
).R_EQUIVALENT_MATCH
isErasure()
and isEquivalent()
will both answer true
). <String>generic("")
).generic("")
).R_FULL_MATCH
isErasure()
, isEquivalent()
and
isExact()
will all answer true
). <String>generic("")
).generic("")
).String search pattern | Code |
SearchMatch |
|
RuleSearchPattern.R_... |
Raw |
||
generic |
generic(exc) |
R_FULL_MATCH | true |
<Object>generic(obj) | R_FULL_MATCH | false | |
<Exception>generic(exc) | R_FULL_MATCH | false | |
<RuntimeException>generic(run) | R_FULL_MATCH | false | |
<Exception>generic(Exception) |
<Exception>generic(exc) | R_FULL_MATCH | false |
<U>generic(U) |
generic(exc) |
R_EQUIVALENT_MATCH | true |
<Object>generic(obj) | R_FULL_MATCH | false | |
<Exception>generic(exc) | R_FULL_MATCH | false | |
<RuntimeException>generic(run) | R_FULL_MATCH | false | |
<?
extends Exception>generic(Exception) |
<Exception>generic(exc) | R_EQUIVALENT_MATCH | false |
<? extends Exception>generic(U) |
generic(exc) |
R_EQUIVALENT_MATCH | true |
<Object>generic(obj) | R_ERASURE_MATCH | false | |
<Exception>generic(exc) | R_EQUIVALENT_MATCH | false | |
<RuntimeException>generic(run) | R_EQUIVALENT_MATCH | false |
IJavaElement search pattern |
Code |
SearchMatch |
|
RuleSearchPattern.R_... |
Raw |
||
generic(null); |
generic(exc) |
R_FULL_MATCH |
true |
<Object>generic(obj) | R_EQUIVALENT_MATCH | false | |
<Exception>generic(exc) | R_EQUIVALENT_MATCH | false | |
<RuntimeException>generic(run) | R_EQUIVALENT_MATCH | false | |
<Exception>generic(exc); |
generic(exc) |
R_EQUIVALENT_MATCH | true |
<Object>generic(obj) | R_ERASURE_MATCH | false | |
<Exception>generic(exc) | R_FULL_MATCH | false | |
<RuntimeException>generic(run) | R_ERASURE_MATCH | false |
String search pattern |
Code |
SearchMatch |
|
RuleSearchPattern.R_... |
Raw |
||
or paramTypesArgs(Single ) paramTypesArgs(Single <Exception>) (1) |
new
Single(). paramTypesArgs(gs); |
R_FULL_MATCH | true |
new
Single<Object>(). paramTypesArgs(gs); |
R_FULL_MATCH | false | |
new
Single<Exception>(). paramTypesArgs(gs); |
R_FULL_MATCH | false | |
new
Single<RuntimeException>(). paramTypesArgs(gs); |
R_FULL_MATCH | false | |
|
|||
Single.paramTypesArgs or Single.paramTypesArgs(Single) or Single.paramTypesArgs(Single<Exception>) (1) |
new
Single(). paramTypesArgs(gs); |
R_FULL_MATCH | true |
new
Single<Object>(). paramTypesArgs(gs); |
R_EQUIVALENT_MATCH | false | |
new
Single<Exception>(). paramTypesArgs(gs); |
R_EQUIVALENT_MATCH | false | |
new
Single<RuntimeException>(). paramTypesArgs(gs); |
R_EQUIVALENT_MATCH | false | |
|
|||
Single<Exception>.paramTypesArgs or Single <Exception> .paramTypesArgs(Single) or Single <Exception> .paramTypesArgs(Single<Exception>) (1) |
new
Single(). paramTypesArgs(gs); |
R_EQUIVALENT_MATCH | true |
new
Single<Object>(). paramTypesArgs(gs); |
R_ERASURE_MATCH | false | |
new
Single<Exception>(). paramTypesArgs(gs); |
R_FULL_MATCH | false | |
new
Single<RuntimeException>(). paramTypesArgs(gs); |
R_ERASURE_MATCH | false | |
|
|||
Single<? extends Exception>.paramTypesArgs or Single<? extends Exception> .paramTypesArgs(Single) or Single<? extends Exception> .paramTypesArgs(Single<Exception>) (1) |
new
Single(). paramTypesArgs(gs); |
R_EQUIVALENT_MATCH | true |
new
Single<Object>(). paramTypesArgs(gs); |
R_ERASURE_MATCH | false | |
new
Single<Exception>(). paramTypesArgs(gs); |
R_EQUIVALENT_MATCH | false | |
new
Single<RuntimeException>(). paramTypesArgs(gs); |
R_EQUIVALENT_MATCH | false |
IJavaElement search pattern |
Code |
SearchMatch |
|
RuleSearchPattern.R_... |
Raw |
||
new Single(). paramTypesArgs(null); |
new
Single(). paramTypesArgs(gs); |
R_FULL_MATCH |
true |
new
Single<Object>(). paramTypesArgs(gs); |
R_EQUIVALENT_MATCH | false | |
new
Single<Exception>(). paramTypesArgs(gs); |
R_EQUIVALENT_MATCH | false | |
new
Single<RuntimeException>(). paramTypesArgs(gs); |
R_EQUIVALENT_MATCH | false | |
new Single<Exception>(). paramTypesArgs(new Single<Exception>()); |
new
Single(). paramTypesArgs(gs); |
R_EQUIVALENT_MATCH | true |
new
Single<Object>(). paramTypesArgs(gs); |
R_ERASURE_MATCH | false | |
new
Single<Exception>(). paramTypesArgs(gs); |
R_FULL_MATCH | false | |
new
Single<RuntimeException>(). paramTypesArgs(gs); |
R_ERASURE_MATCH | false |