更好的设计是
public static YourObject getMyObject(File configFile){ //process and create an object configure it and return it}- 工厂设计模式

更好的设计是
public static YourObject getMyObject(File configFile){ //process and create an object configure it and return it}