/** * Returns the {@code Properties} instance, loaded if necessary from {@code propertiesFileName}. * * @param spi Optional SPI (may be null). * If provided, an attempt is made to load the * property file as-per Class.getResource(). * * @param loaders Used only if properties need to be loaded. * * @return The {@code Properties}, loaded if necessary. */ public Properties getProperties(SPInterface<?> spi, ClassLoaders loaders) { if (properties == null) { properties = ResourceUtils.loadProperties(spi.getSPClass(), getPropertiesFileName(), loaders); } return properties; }