Java Pub House

In this episode we go over Aspects (and AspectJ), what really is, and when to use them. It turns out, that there is nothing misterious about them! We also cover how to set-up Aspects for J2SE so you can start using them immediately!

Questions, feedback or comments!

VM Parameter

Example Aspect


public class OrderAspect {

@Before("execution(* *.*(Order))") // must qualify
public void anyCall() {
System.out.println("Was called from anywhere");

Example aop.xml file

<aspect name="OrderAspect"/>
<weaver options="-verbose -showWeaveInfo">

Example Folder Structure



(Using aspects with annotations)

Direct download: JPHE8.mp3
Category:general -- posted at: 3:00pm CDT