/** * Returns the definition information for the given class loader. * * @param context the class loader and the root folder to read the * <code>{@value de.smartics.properties.api.core.domain.PropertiesContext#DEFINITION_FILE_NAME}</code> * . * @return the definition helper if there is a * <code>{@value de.smartics.properties.api.core.domain.PropertiesContext#DEFINITION_FILE_NAME}</code> * or at least * {@value de.smartics.properties.api.core.domain.PropertiesContext#META_INF_HOME} * , <code>null</code> otherwise. */ @CheckForNull DefinitionKeyHelper getDefinition(final ClassPathContext context) { DefinitionKeyHelper definition = definitionCache.get(context); if (definition == null) { final DefinitionConfigParser<?> parser = ConfigurationKeyContextManager.INSTANCE.context() .definitionConfigParser(); final PropertiesDefinitionContext definitionContext = parser.parse(context); definition = ConfigurationKeyContextManager.INSTANCE.context() .definitionKeyHelper(definitionContext); definitionCache.put(context, definition); } return definition; }