Proposal cites the need for an ‘accurate, complete, up-to-date, performant’ API for parsing, generating, and transforming Java class files. Credit: Pablo Merchán Montes Java would get an API for processing Java class files, under a proposal afoot in the Java community. The draft classfile API proposal calls for provision of an API for parsing, generating, and transforming Java class files. This classfile library initially would serve as an internal replacement for the ASM Java bytecode manipulation framework. Eventually, ASM would be removed entirely from the JDK. The classfile API proposal notes that class file generation, parsing, and instrumentation are ubiquitous in the Java ecosystem, with many tools and libraries needing to process class files. Frameworks often perform on-the-fly bytecode instrumentation. The JDK, the proposal states, should provide an accurate, complete, up-to-date, performant API for reading, writing, and transforming Java class files. Design goals and principles for the API include having all class file entities, such as methods and fields, represented by immutable objects. User-driven navigation also is a goal. Motivating the call for a Java classfile library are factors including: JDK consolidation, with the JDK itself significant in dealing with class files. And there is a delay inherent in the JDK’s use of ASM. Version skew between frameworks and running the JDK. Applications and frameworks processing class files usually bundle a classfile library such as ASM. But because new class file features can appear in any release of the JDK, applications and frameworks are more frequently encountering class files that are newer than the library they are bundled with, resulting in runtime errors or in frameworks trying to parse class file formats from the future. Developers want a classfile library that will be up-to-date with running the JDK. The JVM and class file format now are evolving faster than before. While some evolutions are simple, others are more complex, such as Project Valhalla bringing forth new bytecodes, field descriptors, and verification rules. The language has improved substantially since ASM was written. Plans call for initially replacing ASM as a runtime dependency of the JDK without unacceptable loss of performance. Another goal would be to replace the internal classreader library used by the compiler and JDK tools. Eventually, a range of frameworks and applications should be able to use the library as an alternative to ASM, cglib, and other bytecode libraries. Related content feature What is Rust? Safe, fast, and easy software development Unlike most programming languages, Rust doesn't make you choose between speed, safety, and ease of use. Find out how Rust delivers better code with fewer compromises, and a few downsides to consider before learning Rust. By Serdar Yegulalp Nov 20, 2024 11 mins Rust Programming Languages Software Development how-to Kotlin for Java developers: Classes and coroutines Kotlin was designed to bring more flexibility and flow to programming in the JVM. Here's an in-depth look at how Kotlin makes working with classes and objects easier and introduces coroutines to modernize concurrency. By Matthew Tyson Nov 20, 2024 9 mins Java Kotlin Programming Languages analysis Azure AI Foundry tools for changes in AI applications Microsoft’s launch of Azure AI Foundry at Ignite 2024 signals a welcome shift from chatbots to agents and to using AI for business process automation. By Simon Bisson Nov 20, 2024 7 mins Microsoft Azure Generative AI Development Tools news Microsoft unveils imaging APIs for Windows Copilot Runtime Generative AI-backed APIs will allow developers to build image super resolution, image segmentation, object erase, and OCR capabilities into Windows applications. By Paul Krill Nov 19, 2024 2 mins Generative AI APIs Development Libraries and Frameworks Resources Videos