You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
1009 B
65 lines
1009 B
4 years ago
|
package records;
|
||
|
|
||
|
public record TestRecordSimple(int x, int y) {
|
||
|
public TestRecordSimple(int x, int y) {
|
||
|
this.x = x;
|
||
|
this.y = y;
|
||
|
}
|
||
|
|
||
|
public final String toString() {
|
||
|
return this.toString<invokedynamic>(this);
|
||
|
}
|
||
|
|
||
|
public final int hashCode() {
|
||
|
return this.hashCode<invokedynamic>(this);
|
||
|
}
|
||
|
|
||
|
public final boolean equals(Object o) {
|
||
|
return this.equals<invokedynamic>(this, o);
|
||
|
}
|
||
|
|
||
|
public int x() {
|
||
|
return this.x;
|
||
|
}
|
||
|
|
||
|
public int y() {
|
||
|
return this.y;// 3
|
||
|
}
|
||
|
}
|
||
|
|
||
|
class 'records/TestRecordSimple' {
|
||
|
method '<init> (II)V' {
|
||
|
6 4
|
||
|
b 5
|
||
|
e 6
|
||
|
}
|
||
|
|
||
|
method 'toString ()Ljava/lang/String;' {
|
||
|
1 9
|
||
|
6 9
|
||
|
}
|
||
|
|
||
|
method 'hashCode ()I' {
|
||
|
1 13
|
||
|
6 13
|
||
|
}
|
||
|
|
||
|
method 'equals (Ljava/lang/Object;)Z' {
|
||
|
2 17
|
||
|
7 17
|
||
|
}
|
||
|
|
||
|
method 'x ()I' {
|
||
|
1 21
|
||
|
4 21
|
||
|
}
|
||
|
|
||
|
method 'y ()I' {
|
||
|
1 25
|
||
|
4 25
|
||
|
}
|
||
|
}
|
||
|
|
||
|
Lines mapping:
|
||
|
3 <-> 26
|