Question Marc Alcala · Jan 24, 2017

Hi all!

I'm developing a mini-framework to implement annotations in Cache. I want to support two kind of annotations: metadata and method decorators. I've got stuck trying to implement the second one.

Metadata

With metadata annotations I can add metadata to any kind of target. A target can be a method/classmethod, parameter, property and class.

For example:

Class cache.TestClass Extends lib.Annotations{/// @Author(UserName = "me")ClassMethod Test(){Write "Test!",!}}

Then, after compiling the class "cache.TestClass"  I can obtain the Author metadata by calling the method

16
0 808
Question Marc Alcala · Aug 4, 2016

Using the method ##class(%SYSTEM.Process).GlobalReferences() I'm able to know how many global references has been done in the process. But I'd like to know how many of those references has been done by my code and how many has been done by Cache itself.

When from a class I execute a method of another class, Cache is internally accessing globals (I suppose to get the code of the called method). I would like to not count those accesses done by Cache.

For example:

I've a method (Statistics) that counts the number of references done by another method (A).

6
0 909