Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Add instrumentation to standard objects

5 views
Skip to first unread message

xuesong chen

unread,
Mar 9, 2010, 12:50:09 PM3/9/10
to
Hi there,

I would like to add some instrumentation to some standard objects like
native string and array to monitor some events like string
concatenation, array insertion? what is the best way to do it without
patching Rhino? does the following code solve the problem?
--------------------------------------------------
ScriptableObject.defineClass(scope, MyPkg.String.class);
ScriptableObject.defineClass(scope, MyPkg.Array.class);
--------------------------------------------------

Thanks.

Arthur

0 new messages