/** * set property locations * * @param propertyLocations lists of property locations which can be Strings: use as Directory * Classes: use as Class Resource Location * @return the instance of ConfigBuilder */ public ConfigBuilder<T> withPropertyLocations(Object... propertyLocations) { final DefaultPropertyLocationContainer locations = propertyLoader.getLocations(); locations.clear(); for (Object propertyLocation : propertyLocations) { if (propertyLocation instanceof String) { locations.atDirectory((String) propertyLocation); } else if (propertyLocation instanceof Class) { locations.atRelativeToClass((Class) propertyLocation); } else if (propertyLocation == AT_CONTEXT_CLASS_PATH) { locations.atContextClassPath(); } else { LOGGER.warn("unhandled property location '{}'", propertyLocation); } } return this; }