Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Introducing fields; can the type be changed?

I'm trying to write an aspect that takes a POJO and then introduces fields to make it live within the Naked Objects framework (http://www.nakedobjects.org).

For example, where I might have:

public Customer {
private String lastName;
private String firstName;
}

I'd like to introduce:
import org.nakedobjects.object;
//
private TextString no$LastName;
private TextString no$FirstName;
..

or something similar.  Similarly, an int field would correspond to the WholeNumber type in Naked Objects.

I'm stumped on how to do this; my best guess is instead to have a generic Map of TextStrings, but this would force me to modify the framework.  Any help gratefully received.

Many thanks
Dan Haywood






Back to the top