RFR 8146251: Avoid annotation to specify documentation for JS builtin functions

Sundararajan Athijegannathan sundararajan.athijegannathan at oracle.com
Tue Dec 29 04:24:27 UTC 2015


Please review http://cr.openjdk.java.net/~sundar/8146251/ for 
https://bugs.openjdk.java.net/browse/JDK-8146251

Instead of annotation like:

@Function(attributes = Attribute.NOT_ENUMERABLE, where = 
Where.CONSTRUCTOR, documentation = "returns the prototype of the 
specified object")

to specify documentation,  a properties file is used and the 
documentation property key is automatically derived 
(Object.prototype.hasOwnProperty, Object.keys etc.) This allow adding 
documentation (+ localizing it) by just editing a properties file.

Thanks,
-Sundar


More information about the nashorn-dev mailing list