Closed Bug 657541 Opened 15 years ago Closed 7 years ago

Add functions to ScriptableObject that will introspect for annotations and define properties automatically

Categories

(Rhino Graveyard :: Core, enhancement)

x86
Linux
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED INACTIVE

People

(Reporter: joshuastorck, Unassigned)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.24 (KHTML, like Gecko) Ubuntu/10.04 Chromium/11.0.696.65 Chrome/11.0.696.65 Safari/534.24 Build Identifier: While the ScriptableObject.defineClass method introspects methods with JSSetter, JSGetter, JSFunction, and JSStaticFunction annotations, there is no equivalent for the ScriptableObject.defineFunctionProperties and ScriptableObject.defineFunctionProperty(String, Class<?>, int). I propose adding two new methods to ScriptableObject: void defineFunctionPropertiesFromAnnotations(Class<?>) void definePropertiesFromAnnotations(Class<?>) I have implemented the methods and have a patch ready including unit tests. Reproducible: Always Steps to Reproduce: N/A
I have added a new annotation called JSAttributes. This annotation will be used instead of passing in an attributes parameter to the proposed methods

Closing. Bug management is now done here:
https://github.com/mozilla/rhino

Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: