MathewWi / umple

Automatically exported from code.google.com/p/umple
0 stars 0 forks source link

Association name ending in 's' generates inconsistent method names #658

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The following Umple snippet ...

class Qx {}
class Xs {}

association { * Qx qx -- * Xs xs; }

... generates the following code in class Qx (in Java):

  private List<Xs> xs;

  public Xs getX(int index)
  {
    Xs aX = xs.get(index);
    return aX;
  }

You would expect the following instead:

  public Xs getXs(int index)
  {
    Xs aX = xs.get(index);
    return aX;
  }

It appears the translator strips off the trailing s when generating methods 
that are considered singular as opposed to plural. Also, this appears to be 
independent of the multiplicities in question. 

Original issue reported on code.google.com by alexwith...@gmail.com on 4 Dec 2014 at 12:34