Is it possible to declare new constructors with @DeclareParens/@DeclareMixins?

View: New views
2 Messages — Rating Filter:   Alert me  

Is it possible to declare new constructors with @DeclareParens/@DeclareMixins?

by João Gonçalves-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

In traditional syntax, it is possible to declare members (fields, methods, and constructors) via inter-type declarations.

With @DeclareParents/@DeclareMixins it is easy to emulate fields (with getter and setter methods).

Is it also possible to declare new constructors for a type?

Thanks

_______________________________________________
aspectj-users mailing list
aspectj-users@...
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Re: Is it possible to declare new constructors with @DeclareParens/@DeclareMixins?

by Ramnivas Laddad :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes, you can. For example, this is how you will introduce a no-arg constructor to the Account type.

public Account.new() {
   ...
}

-Ramnivas

2009/9/4 João Gonçalves <jocolimonada@...>
In traditional syntax, it is possible to declare members (fields, methods, and constructors) via inter-type declarations.

With @DeclareParents/@DeclareMixins it is easy to emulate fields (with getter and setter methods).

Is it also possible to declare new constructors for a type?

Thanks

_______________________________________________
aspectj-users mailing list
aspectj-users@...
https://dev.eclipse.org/mailman/listinfo/aspectj-users



_______________________________________________
aspectj-users mailing list
aspectj-users@...
https://dev.eclipse.org/mailman/listinfo/aspectj-users