title: Simple use of AspectJ in a standalone application
body: <p>Imagine you have an aspect:</p>
  
  <pre><code>@Aspect
  public class MyAspect {
      @Pointcut("whatever")
      public void anyAnnotation() {}
  
      @Before("anyAnnotation()")
      public void anyComponentAdvice(JoinPoint joinPoint) {
          System.out.println("DONE");
      }
  }
  </code></pre>
  
  <p>And you have a simple app:</p>
  
  <pre><code>public class MyClass {
      public static void main(String[] args) {
          // ASPECTJ INITIALIZATION BLOCK
          // rest of the code
      }
  }
  </code></pre>
  
  <p>What code do you need to put into the "aspectj initialization block" for the application to automatically recognize and apply the aspects?</p>
  
  <p>With some frameworks such as Spring AOP you can use <code>&lt;aop:aspectj-autoproxy/&gt;</code>, but I do not know how to do the same without Spring.</p>
  
  <p><strong>Edit</strong>: other simpler ways to intercept method calls at execution time, without aspects, are welcome.</p>