Open up API for reading and writing attributes
The API for reading and writing custom Attributes in ASM currently requires instances of ClassReader and ClassWriter. This makes it impossible to offer custom readers and writers for class files. This can easily avoided by abstracting the relevant methods out into interfaces.
This API change would make it possible to complete a bridge from ASM to the OpenJDK API and back: https://github.com/raphw/asm-jdk-bridge
As of now, attributes are not handled fully due to this API limitation. Additionally, it would also result in a cleaner API as irrelevant methods are not exposed in the API. The change does not introduce any compatibility issues.
This problem is also mentioned in this previous discussion: #317978
Edited by raphw