@SuppressWarnings("unchecked") @Override public <T> URLArtifactProcessor<T> getProcessor(Class<T> modelType) { loadProcessors(); return (URLArtifactProcessor<T>)super.getProcessor(modelType); }
@SuppressWarnings("unchecked") @Override public <T> URLArtifactProcessor<T> getProcessor(Class<T> modelType) { loadProcessors(); return (URLArtifactProcessor<T>)super.getProcessor(modelType); }
public Collection<URLArtifactProcessor<?>> getProcessors(Object artifactType) { loadProcessors(); String uri = (String)artifactType; if (uri.endsWith("/")) { // Ignore directories return Collections.emptyList(); } if (!uri.startsWith("/")) { uri = "/" + uri; } List<URLArtifactProcessor<?>> processors = new ArrayList<URLArtifactProcessor<?>>(); for (Map.Entry<Object, URLArtifactProcessor<?>> e : processorsByArtifactType.entrySet()) { Pattern pattern = (Pattern)e.getKey(); if (pattern.matcher(uri).matches()) { processors.add(e.getValue()); } } return processors; }
public Collection<URLArtifactProcessor<?>> getProcessors(Object artifactType) { loadProcessors(); String uri = (String)artifactType; if (uri.endsWith("/")) { // Ignore directories return Collections.emptyList(); } if (!uri.startsWith("/")) { uri = "/" + uri; } List<URLArtifactProcessor<?>> processors = new ArrayList<URLArtifactProcessor<?>>(); for (Map.Entry<Object, URLArtifactProcessor<?>> e : processorsByArtifactType.entrySet()) { Pattern pattern = (Pattern)e.getKey(); if (pattern.matcher(uri).matches()) { processors.add(e.getValue()); } } return processors; }