I imagine that this question has been asked before, yet I'm not able to find an answer using the form of the question I believe might be asked.
Is there a mechanism for duplicating the functionality of Aspect Oriented Programming (AOP).
For example, if one has an existing application that accesses a particular set of sensitive files, my desire would be to Log/Monitor/Intercept/Visualize access to and operations upon those files and their data.
Given my shallow faculty with Mathematica I envision that such might take the form:
Intercept[FileSystemScan, FunctionThatDecidesWhenBeforeAfterDuring, FunctionThatDecidesWhatToDo, FunctionThatHandlesErrors] Intercept[AllFunctionsWithSignatureFooOptionallyIncludingContext,FunctionthatDecidesWhen,FunctionThatDecidesWhat,FunctionThatHandlesErrors]
Or something to that effect.
I looked at
Trace, yet that doesn't seem to be exactly that for which I am looking. Yet, perhaps I just do not fully understand it.