From: Gregory B. <gbr...@bl...> - 2011-08-12 00:14:55
|
Is there support for adding method annotations to C# or Java methods? e.g. in java: @SpecialMethod void doSomething() or in C# [SpecialMethod] public void doSomething() I suppose one could try to use csmethodmodifiers, but I was hoping that there was something that came out of the 2009 Google Summer of Code. Also, it would be nice if there was support for non-static module functions in C# and Java: i.e instead of [DllImport("SierraQuantLib", EntryPoint="CSharp_new_AC1D_d")] public static extern IntPtr new_AC1D_d(double[] jarg1, int jarg2); we could get SWIG to generate a static method that called a class function [DllImport("SierraQuantLib", EntryPoint="CSharp_new_AC1D_d")] private static extern IntPtr new_AC1D_d_internal(double[] jarg1, int jarg2); public static IntPtr new_AC1D_d(double[] jarg1, int jarg2) { return instance().new_ACID_d_hookable(); } public IntPtr new_AC1D_d(double[] jarg1, int jarg2) { return new_ACID_d_internal(); } This allows you to inherit the module from some other class and install class method hooks. I have a working implementation, albeit not implemented as a feature directive. Thanks Gregory R. Bronner This e-mail is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, the information in this e-mail by persons or entities other than the intended recipient is prohibited and may be unlawful. If you received this in error, please contact the sender and delete the material from any computer. This communication is for informational purposes only. It is not intended as and does not constitute an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction. All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice. Any comments or statements made herein do not necessarily reflect those of BlueMountain Capital Management LLC or its affiliates. PAST PERFORMANCE IS NOT NECESSARILY INDICATIVE OF FUTURE RESULTS. |