After class
Marks an aspect method to run after each matched call, whether it
returned or threw, like a finally block.
Use it for clean-up and "call finished" logging. It cannot change the
result or the error. For a method returning a Future, it runs when the
future completes, not when the method returns.
// Records the end of every Calculator call, even a failed one.
@After('execution(* Calculator.*(..))')
void after() => log.add('after');
Spring (Java):
@After("execution(* Calculator.*(..))")
void after() { log.add("after"); }
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited