@SuppressWarnings("unchecked") public void resolve(Object model, ModelResolver resolver, ProcessorContext context) throws ContributionResolveException { // Delegate to the processor associated with the model type if (model != null) { URLArtifactProcessor processor = processors.getProcessor(model.getClass()); if (processor != null) { processor.resolve(model, resolver, context); } } }
@SuppressWarnings("unchecked") public void resolve(Object model, ModelResolver resolver, ProcessorContext context) throws ContributionResolveException { // Delegate to the processor associated with the model type if (model != null) { URLArtifactProcessor processor = processors.getProcessor(model.getClass()); if (processor != null) { processor.resolve(model, resolver, context); } } }
private boolean introspect(OSGiImplementation implementation, ModelResolver resolver, ProcessorContext context, Bundle bundle) throws ContributionReadException, ContributionResolveException { String componentTypeFile = (String)bundle.getHeaders().get(COMPONENT_TYPE_HEADER); if (componentTypeFile == null) { componentTypeFile = BUNDLE_COMPONENT_TYPE; } URL url = bundle.getEntry(componentTypeFile); if (url != null) { URLArtifactProcessorExtensionPoint processors = registry.getExtensionPoint(URLArtifactProcessorExtensionPoint.class); URLArtifactProcessor<ComponentType> processor = processors.getProcessor(ComponentType.class); ComponentType componentType = processor.read(null, URI.create(BUNDLE_COMPONENT_TYPE), url, context); artifactProcessor.resolve(componentType, resolver, context); mergeFromComponentType(implementation, componentType, resolver, context); return true; } return false; }
processor = (URLArtifactProcessor<Object>)processors.getProcessor(uri);
public synchronized List<Definitions> getDefinitions() { if (!loaded) { loadDefinitionsDocuments(); URLArtifactProcessorExtensionPoint processors = registry.getExtensionPoint(URLArtifactProcessorExtensionPoint.class); URLArtifactProcessor<Definitions> processor = processors.getProcessor(Definitions.class); ProcessorContext context = new ProcessorContext(monitorFactory.createMonitor()); for (URL url : documents) { Definitions def; try { def = processor.read(null, DEFINITIONS_URI, url, context); definitions.add(def); } catch (ContributionReadException e) { logger.log(Level.SEVERE, e.getMessage(), e); } } loaded = true; } return definitions; }
processor = (URLArtifactProcessor<Object>)processors.getProcessor(uri);
public synchronized List<Definitions> getDefinitions() { if (!loaded) { loadDefinitionsDocuments(); URLArtifactProcessorExtensionPoint processors = registry.getExtensionPoint(URLArtifactProcessorExtensionPoint.class); URLArtifactProcessor<Definitions> processor = processors.getProcessor(Definitions.class); ProcessorContext context = new ProcessorContext(monitorFactory.createMonitor()); for (URL url : documents) { Definitions def; try { def = processor.read(null, DEFINITIONS_URI, url, context); definitions.add(def); } catch (ContributionReadException e) { logger.log(Level.SEVERE, e.getMessage(), e); } } loaded = true; } return definitions; }
(ExtendedURLArtifactProcessor<Contribution>)docProcessorExtensions.getProcessor(Contribution.class);