@Override public ConfigObject include(ConfigIncludeContext configIncludeContext, String s) { ConfigSyntax syntax = null; if (s.endsWith("conf")) { syntax = ConfigSyntax.CONF; } else if (s.endsWith("json")) { syntax = ConfigSyntax.JSON; } else if (s.endsWith("properties")) { syntax = ConfigSyntax.PROPERTIES; } if (syntax != null) { ConfigParseOptions newParseOptions = configIncludeContext.parseOptions().setSyntax(syntax); return includer.include( new CustomConfigIncludeContext(configIncludeContext, newParseOptions), s); } else { // who knows what the syntax was suppose to be return includer.include(configIncludeContext, s); } }