ConverterStrategy (ConvertContext context) { DomElement parent = context.getInvocationElement().getParent(); if (parent instanceof MavenDomProjectModel) { return new ProjectStrategy(); } if (parent instanceof MavenDomParent) { return new ParentStrategy((MavenDomParent)parent); } if (parent instanceof MavenDomDependency) { return new DependencyStrategy((MavenDomDependency)parent); } if (parent instanceof MavenDomExclusion) { return new ExclusionStrategy(); } if (parent instanceof MavenDomPlugin) { return new PluginOrExtensionStrategy(true); } if (parent instanceof MavenDomExtension) { return new PluginOrExtensionStrategy(false); } return new ConverterStrategy(); }