/** * Returns the key for the given resource identifier. * * @param resourceId the identifier of a resource. Usually the path to a * properties file within an archive. * @return the configuration key the resource is associated with or the * default {@code anyKey} if none is registered for the given * {@code resourceId}. The default key may be <code>null</code>. */ public ConfigurationKey<?> getKey(final String resourceId) { for (final PropertiesResourceMatcher matcher : matchers) { if (matcher.match(resourceId)) { return matcher.getConfigurationKey(); } } return anyKey; }