Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Inter-Type constructor

I want to define the Client constructor in the aspect instead of the class itself. Shouldn't it be like this? The compiler says :
inter-type declaration from declare_question.X conflicts with existing member: void declare_question.Client.<init>()    ola/src/declare_question    X.aj    line 6   
------------------------------------------
package declare_question;


package declare_question;

public class Client {
   
    public static void main(String[] args) {
           Client o = new Client();
       }
}
--------------------------------------------------

package declare_question;

public aspect X {

    public Client.new(){
        System.out.println("cliente");
    }
}

Back to the top