I'm just a bit confused with the parameters in a pointcut would appreciate if anyone could explain it to me...
import Java.util.logging.*;
import org.aspect j.lang.*;
public aspect TraceAspect {
private Logger _logger = Logger.getLogger("trace");
TraceAspectV2() {
_logger.setLevel(Level.ALL);
}
pointcut traceMethods()
(execution(* Account.*(..)) || execution(*.new(..))) && !within(TraceAspect);
before () : traceMethods() {
if (_logger.isLoggable(Level.INFO)) {
Signature sig = thisJoinPointStaticPart.getSignature();
_logger.logp(Level.INFO, sig.getOeclaringType().getName(),sig.getNameO , "Entering");
}
)
)
The pointcut in the aspect defines when trace messages should be generated. Describe in your own words when, that is, at what points of the program, the log message "Entering" will be generated.
PS: This is from a past exam paper.... And i'm trying to understand when exactly does the logger generate the Entering....