8338700: AttributeMapper type parameter should be bounded by Attribute

Reviewed-by: asotona
This commit is contained in:
Chen Liang 2024-08-23 15:16:44 +00:00
parent 916f1aa04f
commit a461369f16
5 changed files with 6 additions and 6 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -40,7 +40,7 @@ import jdk.internal.javac.PreviewFeature;
* @since 22
*/
@PreviewFeature(feature = PreviewFeature.Feature.CLASSFILE_API)
public interface AttributeMapper<A> {
public interface AttributeMapper<A extends Attribute<A>> {
/**
* Attribute stability indicator

View file

@ -147,7 +147,7 @@
* ClassReader, int)} method for mapping from the classfile format
* to an attribute instance, and the
* {@link java.lang.classfile.AttributeMapper#writeAttribute(java.lang.classfile.BufWriter,
* java.lang.Object)} method for mapping back to the classfile format. It also
* java.lang.classfile.Attribute)} method for mapping back to the classfile format. It also
* contains metadata including the attribute name, the set of classfile entities
* where the attribute is applicable, and whether multiple attributes of the
* same kind are allowed on a single entity.