IntelliJ IDEA lets you create aspects in two forms: as
.java files containing classes annotated with
To create an aspect
In the Project tool window, do one of the following:
- Select your source directory or the package in which you want to create a new aspect, and select File | New.
- Select the source directory or package, and press Alt+Insert.
- Right-click the source directory or package to open the context menu, and select New.
- Select Aspect.
In the dialog that opens:
- Specify the name of the aspect in the Name field.
Select one of the following options from the Kind list:
Aspect to create a
.ajfile with the specified name.
@Aspect to create a
.javafile containing a class annotated with
- Aspect to create a
- Click OK.
Last modified: 4 December 2014