Aspect J

From no name for this wiki
Revision as of 16:33, 21 March 2008 by 84.226.90.208 (talk) (AspectJ Samples)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Sample 1

Hello World Ganz einfaches Hello World für AspectJ. Compiletime Aspects. So werden die Files kompiliert:

D:/Programme/aspectj1.5/bin/ajc.bat -cp D:/Programme/aspectj1.5/lib/aspectjrt.jar ./aspectjsample1/*.java

So wird das Programm ausgeführt:

java -cp D:/Programme/aspectj1.5/lib/aspectjrt.jar;. aspectjsample1.Main

Files:

Sample 2

@AspectJ Sample Gleiches Sample mit Annotationen. Zum kompilieren:

D:/Programme/aspectj1.5/bin/ajc.bat -cp D:/Programme/aspectj1.5/lib/aspectjrt.jar -1.5 ./aspectjsample2/*.java

Zum ausführen:

java -cp D:/Programme/aspectj1.5/lib/aspectjrt.jar;. aspectjsample2.Main

Files: