[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] "Can define an AspectJ with a hasmethod Pointcut for...?"

Hello all,

  This issue started in the previous topic "Help with hasmethod() and hasfield() pointcuts". In this way, I mentioned the real point that I really want in my last commentary in this previous topic. So, I decided to put it in a new topic in order to give more discussion about.

  He we go :

     (1) My main question now is:

      Consider the following example:

          class C {

           public void x(){}
         }

         aspect C{

             // Verify if the method "public void x(){}" exists in Class C (using the hasmethod() pointcut), and if exists, (our case), inserts a method into C using the inter-type declaration like:

             public boolean C.checkSomeProperties(){}
        }

      QUESTION: Is there a way to provide this behavior in AspectJ without using an Interface as intermediate ??


   Regards!!

  

--
Henrique Mostaert, Departamento de Sistemas Computacionais, UPE