0
我遇到以下關於AOP的片段。有人能告訴我什麼是編程語言嗎?AOP snippet:這是Aspectj嗎?
public aspect MyAspect
{
// Define a pointcut matched by all methods in the application whose name begins with
// Get and accepting no arguments. (There are many other ways to define criteria.)
public pointcut allGetMethods():
call (* Get*());
// Define an advice to run before any join points that matches the specified pointcut.
before(): allGetMethods()
{
// Do your cross-cutting concern stuff here
// for example, log about the method being executed
.
.
.
}
}
是AspectJ的? 還是沒有這樣的語言?
[AOP](http://en.wikipedia.org/wiki/Aspect-oriented_programming)與其說是一種範式,不如說是一種「編程語言」,它看起來像使用的切入點模型(和語法)與[AspectJ](http://en.wikipedia.org/wiki/AspectJ)。但是,因爲這是標記.NET,請參閱http://stackoverflow.com/questions/5574357/external-aop-like-aspectj-weaving-for-net – 2011-11-02 22:09:24