TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Making Java fully dynamic via invokedynamic and dynamic class creation

2 pointsby nerds-centralabout 14 years ago
The op-code thing is a means to an end. The key of the article is how to use this technique to get at the new invokedynamic op-code and use the dynamic language features that provides from Java. Java does not support invokedynamic in syntax, so there are a few hoops to jump through to get to it. One can create a class which has an invokedynamic call site in it. Then link to that class. However, that is not very flexible. So using dynamic class loading from op-codes to create a new class site and then using that from Java (by casting to a know interface) makes a very clean pattern for Java its self to make use of invokedynamic.

1 comment

nerds-centralabout 14 years ago
I am personally convinced that invokedynamic (the new BA op-code for Java 7) is not just for dynamic language support. Patterns like the one in this post _will_ let people develop dynamic approaches to Java. This will effect aspect oriented programming, all reflection based system and so on. I can see applications in server environments where objects/beans etc can use invokedynamic to tight bind initially loosely associated business logic.<p>In short - I believe invokedynamic is a game changer for Java and everything that interoprates with or competes with Java.