Hello,
Hello,
I'd like to define an Aspect to detect use of "instanceOf" instruction in my
business domain code.
As I'm using Hibernate, the abstract @Entity class "Pet" cannot be casted to
its child "Cat" due to Hibernate proxies :
Pet felix = ....;
if (felix instanceOf Cat) { // will always be false
Cat cat = (Cat) felix; // will fail anyway
}
To avoid such error in code, I'd like to create an aspect to detect use of
instanceOf with a class that is annotated with @Entity.
As I'm not an aspectJ pointcut expression guru, I'd welcome any help ;-)
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users