title: Java native AOP | Imports in Aspect required
body: <p>While playing around with native AspectJ in IntelliJ I noticed something strange: An advice is not executed if I don't have the import(s) of the class(es) that I use in the corresponding pointcut.
  For example, assume the following pointcut:</p>
  
  <pre><code>public pointcut changeObject():
          call(void MyObject.change());
  </code></pre>
  
  <p>The execution of the advice now depends on the fact whether I have an import statement of <em>MyObject</em> or not. If it's not present, it compiles without errors but I get the message:
  "Warning:(8, 0) ajc: no match for this type name: MyObject [Xlint:invalidAbsoluteTypeName]"</p>
  
  <p><a href="http://o7planning.org/en/10257/java-aspect-oriented-programming-tutorial-with-aspectj" rel="nofollow noreferrer">In this tutorial</a> they do not need imports (IntelliJ also marks the import as unnecessary). So I'm wondering what the problem is.</p>
  
  <p>My setup: IntelliJ Ultimate 2017.1 with enabled AspectJ plugin. I installed 
  AspectJ 1.8.10 and referenced the Ajc compiler in the compiler settings of the IDE. In the projects structure I referenced aspectjrt.jar in "Modules | Dependencies".</p>
  
  <p>Do I miss anything or could it be related to the fact that Intellij has <a href="https://stackoverflow.com/a/35535903/8082357">not the best AspectJ support</a>?</p>