Lines 25-31
Link Here
|
25 |
public class MethodReferenceMatch extends SearchMatch { |
25 |
public class MethodReferenceMatch extends SearchMatch { |
26 |
private boolean constructor; |
26 |
private boolean constructor; |
27 |
private boolean synthetic; |
27 |
private boolean synthetic; |
28 |
private boolean polymorphic; |
28 |
private boolean overridden; |
29 |
|
29 |
|
30 |
/** |
30 |
/** |
31 |
* Creates a new method reference match. |
31 |
* Creates a new method reference match. |
Lines 78-84
Link Here
|
78 |
* <code>false</code> otherwise |
78 |
* <code>false</code> otherwise |
79 |
* @param synthetic <code>true</code> if this search matches a synthetic element |
79 |
* @param synthetic <code>true</code> if this search matches a synthetic element |
80 |
* <code>false</code> otherwise |
80 |
* <code>false</code> otherwise |
81 |
* @param polymorphic <code>true</code> if this search matches a polymorphic element |
81 |
* @param overridden <code>true</code> if this search matches a polymorphic element |
82 |
* <code>false</code> otherwise |
82 |
* <code>false</code> otherwise |
83 |
* @param insideDocComment <code>true</code> if this search match is inside a doc |
83 |
* @param insideDocComment <code>true</code> if this search match is inside a doc |
84 |
* comment, and <code>false</code> otherwise |
84 |
* comment, and <code>false</code> otherwise |
Lines 86-94
Link Here
|
86 |
* @param resource the resource of the element |
86 |
* @param resource the resource of the element |
87 |
* @since 3.3 |
87 |
* @since 3.3 |
88 |
*/ |
88 |
*/ |
89 |
public MethodReferenceMatch(IJavaElement enclosingElement, int accuracy, int offset, int length, boolean constructor, boolean synthetic, boolean polymorphic, boolean insideDocComment, SearchParticipant participant, IResource resource) { |
89 |
public MethodReferenceMatch(IJavaElement enclosingElement, int accuracy, int offset, int length, boolean constructor, boolean synthetic, boolean overridden, boolean insideDocComment, SearchParticipant participant, IResource resource) { |
90 |
this(enclosingElement, accuracy, offset, length, constructor, synthetic, insideDocComment, participant, resource); |
90 |
this(enclosingElement, accuracy, offset, length, constructor, synthetic, insideDocComment, participant, resource); |
91 |
this.polymorphic = polymorphic; |
91 |
this.overridden = overridden; |
92 |
} |
92 |
} |
93 |
|
93 |
|
94 |
/** |
94 |
/** |
Lines 114-127
Link Here
|
114 |
} |
114 |
} |
115 |
|
115 |
|
116 |
/** |
116 |
/** |
117 |
* Returns whether the reference is on a polymorphic method or not. |
117 |
* Returns whether the reference is on a method that is overridden by the |
118 |
* Note that this field is only used for method reference. This happens when the reference |
118 |
* search target or not. If <code>true</code>, the method called at run-time |
119 |
* is not implemented on the declaring class pattern but only on one of its super or sub type. |
119 |
* may or may not be the search target, depending on the run-time type |
|
|
120 |
* of the receiver object. |
120 |
* |
121 |
* |
121 |
* @return <code>true</code> if the reference is a polymorphic method or not, |
122 |
* @return <code>true</code> if the reference is on a method that is |
122 |
* <code>false </code> otherwise |
123 |
* overridden by the search target, <code>false </code> otherwise |
123 |
*/ |
124 |
*/ |
124 |
public boolean isPolymorphic() { |
125 |
public boolean isOverridden() { |
125 |
return this.polymorphic; |
126 |
return this.overridden; |
126 |
} |
127 |
} |
127 |
} |
128 |
} |