I'm trying to create specific class constructor pointcut execution but I get the following marker:
Aspect code:
public aspect CarLogger {
private Logger logger;
pointcut instantiate() : execution (Car.new(..));
after() : instantiate(){
logger.log(Level.INFO, "In Car::Car()", thisJoinPoint.getThis());
}
this code returns no match for this type name Car.
But if I change execution (Car.new(..))
to execution (*.new(..))
I get all constructors in the project.
My wish is to have the pointcut execute only to the specific class Car