Java architecture is really procedural
Classes like Reports and App are filled with if statements and maps of parameters called params.
I saw the effects of this in 3 PRs so far: https://github.com/yegor256/jpeek/pull/168, https://github.com/yegor256/jpeek/pull/173 and https://github.com/yegor256/jpeek/pull/179
All 3 of them introduced rather ugly code, but it's not their fault, that's where the architecture drives to. I think we should start refactoring.
We can start with a PomXml object which would animate the base's pom.xml file and provide any info related to it.
@yegor256/z please, pay attention to this issue
I think I'm OK with just naming it Pom:
public final class Pom implements XML {
//implement XML methods
//add new methods specific to pom.xml
}
@llorllale Not really, if it implements XML then it will offer just the "low level" operations of interface XML and you would still have to write code in order to get what you want from that XML.
I would like it to be more high level and have methods such as version(), scmUrl(), developers(), dependencies() etc
And if you want to have access to the underlying XML, then it could simply have method xml() which would return the raw thing.
@amihaiemil agreed
Although I prefer the name Pom instead of PomXml.