public static SrsSyntax getSrsSyntax(Configuration obj) { for (Configuration dep : ((List<Configuration>) obj.getDependencies())) { if (dep instanceof org.geotools.gml2.GMLConfiguration) { return ((org.geotools.gml2.GMLConfiguration) dep).getSrsSyntax(); } if (dep instanceof org.geotools.gml3.GMLConfiguration) { return ((org.geotools.gml3.GMLConfiguration) dep).getSrsSyntax(); } } return null; }