public static void setSrsSyntax(Configuration obj, SrsSyntax srsSyntax) { for (Configuration dep : ((List<Configuration>) obj.getDependencies())) { if (dep instanceof org.geotools.gml2.GMLConfiguration) { ((org.geotools.gml2.GMLConfiguration) dep).setSrsSyntax(srsSyntax); } if (dep instanceof org.geotools.gml3.GMLConfiguration) { ((org.geotools.gml3.GMLConfiguration) dep).setSrsSyntax(srsSyntax); } } }