Open jonatasdaniel opened 13 years ago
Create FieldReader and FieldWriter interfaces to do this.
Ex: public class Property { //all current attrs, removing setMethod and getMethod private final FieldReader reader; private final FieldWriter writer; }
Then, create DirectAssignmentFieldReader/Writer (or better name) and AcessorMethodFieldReader/Writer (or better name)
By default, use DirectAssignment type.
Create an annotation to define the way to assign a value to a field. Create something like this:
@Assignment(AssignmentType.AcessorMethod) @Assignment(AssignmentType.DirectAssignment)
The annotation is for fields and classes, and when a class is annotated with @Assignment, then all their fields will receive the same configuration