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: [email protected] <mailto:[email protected]>

//
_______________________________________________
mlvm-dev mailing list
[email protected]
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev

Reply via email to