Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.1
-
Fix Version/s: 1.2
-
Component/s: modello-plugin-java
-
Labels:None
-
Complexity:Intermediate
-
Number of attachments :
Description
Modello does not consistently use java.useInterface when generating getter/setter methods for association fields, which becomes more apparent in java5 mode. For example, the following association
<field> <name>entries</name> <association java.useInterface="IEntry"> <type>Entry</type> <multiplicity>*</multiplicity> </association> </field>
will result in the following method signatures in java5 mode
public void addEntry( IEntry entry ) public java.util.List<Entry> getEntries() public void removeEntry( IEntry entry ) public void setEntries( java.util.List<Entry> entries )
Note incorrect type parameter java.util.List<Entry> instead of expected java.util.List<IEntry>
Issue Links
- is related to
-
MODELLO-120
can't have an association to an interface instead of a class
-
Attached patch
MODELLO-222.diff addresses the problem at least partially. More specifically,Unfortunately, I do not know about modello enough to assess whether these are real problems and would appreciate if somebody with the knowledge reviewed the code and provided feedback. Thank you in advance.