The important difference to MethodSelector is that this selector's
equals(Object) method takes into account the selected method's
declaring class to support cases
where a package-private method is declared in a super class in a different
package and a method with the same signature is declared in a subclass. In
that case both methods should be discovered because the one declared in the
subclass does not override the one in the super class.
| Modifier and Type | Field and Description |
|---|---|
| private final Method | |
| private final List | testClasses
Record Component accessed by testClasses(). |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public final boolean | equals(Object o)
Implements abstract java. Indicates whether some other object is "equal to" this one. |
| public final int | |
| public Method | |
| public List | |
| public final String | toString()
Implements abstract java. Returns a string representation of the record. |
| method | back to summary |
|---|---|
| private final Method method Record Component accessed by method(). | |
| testClasses | back to summary |
|---|---|
| private final List<Class<?>> testClasses Record Component accessed by testClasses(). | |
| DeclaredMethodSelector | back to summary |
|---|---|
| pack-priv DeclaredMethodSelector(List<Class<?>> testClasses, Method method) | |
| equals | back to summary |
|---|---|
| public final boolean equals(Object o) Implements abstract java. Doc from java. Indicates whether some other object is "equal to" this one. In addition
to the general contract of
R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
| |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Implements abstract java. Doc from java. Returns a hash code value for the record.
Obeys the general contract of | |
| method | back to summary |
|---|---|
| public Method method() Record Component getter of method. | |
| testClasses | back to summary |
|---|---|
| public List Record Component getter of testClasses. | |
| toString | back to summary |
|---|---|
| public final String toString() Implements abstract java. Doc from java. Returns a string representation of the record.
In accordance with the general contract of In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves. | |