< session />
The Art of Java Language Pattern Matching
Wed, 23 April
Project Amber within OpenJDK focuses on introducing smaller, productivity-oriented Java language features. One key area of innovation from Project Amber is pattern matching, which is now a powerful tool in modern Java development. Pattern matching allows code logic to test whether an expression has a specific type or structure, while extracting components of its state for further processing.
In this session, we will explore the new pattern matching features introduced in recent Java versions, defined by the following JDK Enhancement Proposals (JEPs):
- Pattern matching for
instanceof
(JEP 433) - Pattern matching for
switch
(JEP 441) - Record patterns (JEP 440)
- Unnamed patterns and variables (JEP 456)
- Primitive types in patterns,
instanceof
, andswitch
(JEP 455)
We’ll take a deep dive into how these features work, how they simplify Java code, and the flexibility they bring to pattern matching. Additionally, we’ll explore future features, such as array patterns, that may be included in upcoming Java releases.
By the end of the session, you’ll be fully equipped to apply these powerful new pattern matching features in your own Java projects.
Target Audience: This session is aimed at Java Developers who want to deepen their understanding of pattern matching and incorporate the latest language features into their coding practices. Software Architects may also benefit from learning how these features can simplify code design and improve maintainability. Back-end Engineers working with complex data structures and logic will find value in leveraging pattern matching for cleaner, more efficient code.
< speaker_info />
About the speaker
Simon Ritter
Deputy CTO, Azul Systems
Simon Ritter is the Deputy CTO of Azul. Simon joined Sun Microsystems in 1996 and spent time working in both Java development and consultancy. He has been presenting Java technologies to developers since 1999 focusing on the core Java platform as well as client and embedded applications. At Azul, he continues to help people understand Java and Azul’s JVM products.
Simon is a Java Champion and two time recipient of the JavaOne Rockstar award. In addition, he represents Azul on the JCP Executive Committee, the OpenJDK Vulnerability Group as well as the JSR Expert Group since Java SE 9.