Aspect
Some tasks of the teacher belong to no single pupil. "Check the rule sheet whenever someone reaches for a worksheet" holds for every pupil in the room.
Writing that task out again for every pupil is hopeless, because somebody always misses one. This page is about such a task, set down once, in one place, and carried out everywhere it is needed. The teacher keeps tasks like this for the worksheets, the telephone, the friend outside the room and the side jobs.
What it is
An aspect is the module that holds a cross-cutting concern. It brings together the places the concern applies to (its pointcuts) and the behaviour to run there (its advice).
In Ares the concern is the security check itself. The advice classes under
api/aop hold the logic that decides whether a file, command, thread or
network operation is permitted, written once and applied at every point where such an
operation can occur.
Further reading
- AspectJ Documentation and Resources — Eclipse Foundation
- Intro to AspectJ — Baeldung
- Understanding Aspect-Oriented Programming: Java and AspectJ — Aayush Shrivastav, Medium (freely readable)