Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support generation of Generic Models #21

Open
rfscholte opened this issue May 25, 2018 · 3 comments
Open

Support generation of Generic Models #21

rfscholte opened this issue May 25, 2018 · 3 comments

Comments

@rfscholte
Copy link
Member

rfscholte commented May 25, 2018

The Maven project has several steps to come to a resolved Model (inheritance, interpolation) where values can be symbolic (ie "${something}"). Right now it means that everything has to be a String, even if the resolved value will be an integer or a boolean.
It would be an improvement if there was something like

class Model<BLN,BT,CHR,DBL,INT,FLT,LNG,SHRT>

rawModel = new Model<String,String,String,String,String,String,String>()
resolvedModel = new Model<Byte,Boolean,Character,Double,Integer,Float,Long,Short>()

This way we don't have to do any concessions and the actual Type in the end becomes clear.

@michael-o
Copy link
Member

Is this about the port inpolation issue in settings.xml?

@rfscholte
Copy link
Member Author

Yes and no, but it triggered it. There's no rawSettings in Maven, because most values are just Strings and there's close to no filtering required. The port was the first one and exposed the issue, so maybe there should be a rawSettings.
The MavenProject holds the model and originalModel, and to support interpolation you'll loose the intended type. The concept above should fix that issue, no manual adjustments required.

@hboutemy
Copy link
Member

notice that "the actual Type in the end becomes clear" will be true at use time, but not at generation time (since generics will hide the target type)
I don't know if something can be done to improve this aspect, but at least this generics idea looks promising

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants