InvokeDynamic
Daniel Latrémolière
daniel.latremoliere at gmail.com
Sat Apr 30 03:32:50 PDT 2011
Sorry, I have forgotten the details of invoking the InvokeDynamic
created by this syntax. This can be made by using a syntax like:
| ClassName#indyName(...);|
except if headers contains (like for "static" scope [1]):
| import dynamic packageName.ClassName#indyName;|
||
where it can be invoked directly in code by writing:
| indyName(...);|
More precisely for each scope:
*Scope
* *Field access
* *Method invoke
*
*Static
* ClassName.STATIC_FIELD_NAME
ClassName.staticMethodName(...)
*Dynamic
* ClassName#indyName and ClassName#indyName(...)
*Local class
* this.fieldName
this.methodName(...)
*Super class*
super.fieldName
super.methodName(...)
*Variable
* variableName
waiting for passing method by arguments to others methods
Given an InvokeDynamic is simultaneously a field (can potentially be set
to a new target) and a method (invokable), the InvokeDynamic naming
scope is not split between field access/method invoke like the others
naming scopes of Java.
Daniel.
[1]: Side note, without importance. I consider a bug in Java to have
imported automatically items of static scope from current class (it
helped introducing these two naming rules: camelCase vs. UPPER_CASE) and
encourage preferences to bizarre choices. By example, in JPA, the
metamodel is in different classes of model, suffixed with '_', not in
the same classes (with correct access rights: like not public for
generated id without exposure out of model).
--
Daniel Latrémolière
Mail: daniel.latremoliere at gmail.com <mailto:daniel.latremoliere at gmail.com>
//
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/mlvm-dev/attachments/20110430/59402225/attachment-0001.html
More information about the mlvm-dev
mailing list