Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] new no-arg constructor

Ah, very cool!
I vaguely remember reading about new... some time ago.

I will be able to take my transfer object classes that are intended to be serialized, to also be marshalled with jaxb, the enum classes were causing me problems.

I can do this for explicit classes, but can I introduce a constructor for a pattern of class?  putting an interface, and defining the constructor on the interface as an introduction doesn't work.

Thanks,
Mike


On Thu, Mar 5, 2009 at 5:13 PM, Andy Clement <andrew.clement@xxxxxxxxx> wrote:
Incorrect syntax?  (Yes, the message it gives you is hardly helpful in diagnosing it, sorry about that!)

public aspect A {
    public TestA.new() {  // *** error on this line
       this("wibble");
    }
}

2009/3/5 Michael McCray <mike@xxxxxxxxxxxxxxxxx>
Hi,

I want to add a no argument constructor to a class that does not have oen, this does not seem to be possible, does anyone know why not?

public aspect A {
    public TestA.TestA() {  // *** error on this line
    }
}
public class TestA {
    public TestA(String a) {
    }
}

Thanks,
Mike



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



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




--
Michael D. McCray
Consultant
Technology Partners, Inc.
President
Object Nirvana, Inc.
Maker of
My People Database
- automation for what you do with your friends and family, and a place to store your stories and information.
Website: http://www.mypeopledatabase.com/
Transcendental Beans Database
- an aspect oriented database system,
  the future of data storage
Website: http://www.objectnirvana.com
Blog: http://aodbms.blogspot.com
Email: mike@xxxxxxxxxxxxxxxxx

Back to the top