Skip to content

Add demo for JEP 371 - Hidden Classes (Java 15)#305

Merged
AloisSeckar merged 3 commits intoAloisSeckar:masterfrom
Abhineshhh:feat/jep-371-hidden-classes
Oct 24, 2025
Merged

Add demo for JEP 371 - Hidden Classes (Java 15)#305
AloisSeckar merged 3 commits intoAloisSeckar:masterfrom
Abhineshhh:feat/jep-371-hidden-classes

Conversation

@Abhineshhh
Copy link
Contributor

Description

Implements demo for JEP 371 - Hidden Classes introduced in Java 15.

Fixes #288

Changes Made

  • Added HiddenClassesDemo.java with complete implementation using ASM library
  • Uses ASM to generate bytecode for a simple class at runtime
  • Demonstrates all key features of hidden classes:
    • Creation via Lookup.defineHiddenClass()
    • Non-discoverability with Class.forName()
    • Nest membership
    • Method invocation on hidden class instances
  • Added ASM 9.7.1 dependency to pom.xml
  • Added JEP 371 entry to JDK15Info.json
  • Registered demo in Java15.java initializer

Checklist

  • Follows contribution guide
  • Proper Markdown-style documentation
  • Calls info(371) as first statement
  • JSON entry added in correct order
  • Demo registered in initializer
  • No unrelated changes

@Abhineshhh
Copy link
Contributor Author

Abhineshhh commented Oct 24, 2025

@AloisSeckar have a look to the committed changes

Let's add the latest possible version
Copy link
Owner

@AloisSeckar AloisSeckar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really good. I appreciate the effort. Just bumped the newer version of the ASM library.

@AloisSeckar AloisSeckar added the hacktoberfest Counts as submission for Hacktoberfest 2025 label Oct 24, 2025
@AloisSeckar AloisSeckar merged commit a11efab into AloisSeckar:master Oct 24, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest Counts as submission for Hacktoberfest 2025

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JEP 371 – Hidden Classes

2 participants