Hi
Let's assume that I have collection of files. That collection of files my vary in future, there might be .class .xml .config etc. I would like to do some task for every of mentioned files. For example for .xml I would like to parse that file, for .config I would like to browse for some properties etc. My goal is to have that open for future changes without modifying previously created methods. My ideal solution is to add new methods (classes) for comming new types of file.
public List getListFiles(ZipEntry entry) {
.............
return listFiles;
}
public void doSthWithFiles(List<File> listFiles) {
//here is my issue. I don't want to change that method
every time new file extension is comming. I would like
to do that by adding new method (class) without midifying that
method
}
Kind Regards
najort