mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8336927: Missing equals and hashCode in java.lang.classfile.Annotation
Reviewed-by: asotona
This commit is contained in:
parent
05d88de05e
commit
332df83e7c
2 changed files with 28 additions and 19 deletions
|
@ -32,24 +32,10 @@ import java.util.List;
|
|||
|
||||
import static java.lang.classfile.ClassFile.*;
|
||||
|
||||
public final class AnnotationImpl implements Annotation, Util.Writable {
|
||||
private final Utf8Entry className;
|
||||
private final List<AnnotationElement> elements;
|
||||
|
||||
public AnnotationImpl(Utf8Entry className,
|
||||
List<AnnotationElement> elems) {
|
||||
this.className = className;
|
||||
this.elements = List.copyOf(elems);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Utf8Entry className() {
|
||||
return className;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AnnotationElement> elements() {
|
||||
return elements;
|
||||
public record AnnotationImpl(Utf8Entry className, List<AnnotationElement> elements)
|
||||
implements Annotation, Util.Writable {
|
||||
public AnnotationImpl {
|
||||
elements = List.copyOf(elements);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue