public ComponentMetadataHandler withModule(Object id, Object ruleSource) {
return addRule(createSpecRuleActionFromId(id, ruleActionAdapter.createFromRuleSource(ComponentMetadataDetails.class, ruleSource)));
}
public void processMetadata(MutableModuleComponentResolveMetaData metadata) {
ComponentMetadataDetails details = instantiator.newInstance(ComponentMetadataDetailsAdapter.class, metadata);
processAllRules(metadata, details);
if (!metadata.getStatusScheme().contains(metadata.getStatus())) {
throw new ModuleVersionResolveException(metadata.getId(), "Unexpected status '" + metadata.getStatus() + "' specified for %s. Expected one of: " + metadata.getStatusScheme());
}
}