concept compilation in category aspectj

appears as: compilation
AspectJ in Action, Second Edition

This is an excerpt from Manning's book AspectJ in Action, Second Edition.

An important form of static crosscutting allows detecting and flagging the presence of join points, matching a pointcut during compilation. Let’s see how.

This hypothetical syntax could work, and it’s trivial to learn once you understand the traditional syntax. But a big drawback would be the lack of compile-time checks for the code expressed using the string, if you use javac to compile such code. Any syntactical (or even spelling) errors in code expressed in the string will be reported only at the weave time, which may be as late as deployment time if you use load-time weaving (discussed in the next chapter). For example, any errors in the body of the around() advice will go undetected during compilation using javac. This consideration has led to a few deviations from a straightforward mapping from the traditional syntax (a good example is the if() pointcut, discussed in section 7.3.2).