blob: 64abf3c0c5d5ee556a7550a2e87d40666862119d [file] [log] [blame]
Stuart McCullochf3173222012-06-07 21:57:32 +00001package aQute.lib.spring;
2
3import java.util.*;
4
5import aQute.bnd.service.*;
6import aQute.lib.osgi.*;
7import aQute.libg.header.*;
8
9public class XMLTypeProcessor implements AnalyzerPlugin {
Stuart McCullochf3173222012-06-07 21:57:32 +000010
Stuart McCulloch4482c702012-06-15 13:27:53 +000011 public boolean analyzeJar(Analyzer analyzer) throws Exception {
12 List<XMLType> types = getTypes(analyzer);
13 for (XMLType type : types) {
14 type.analyzeJar(analyzer);
15 }
16 return false;
17 }
Stuart McCullochf3173222012-06-07 21:57:32 +000018
Stuart McCulloch4482c702012-06-15 13:27:53 +000019 protected List<XMLType> getTypes(Analyzer analyzer) throws Exception {
20 return new ArrayList<XMLType>();
21 }
Stuart McCullochf3173222012-06-07 21:57:32 +000022
Stuart McCulloch4482c702012-06-15 13:27:53 +000023 protected void process(List<XMLType> types, String resource, String paths, String pattern) throws Exception {
24
25 Parameters map = Processor.parseHeader(paths, null);
26 for (String path : map.keySet()) {
27 types.add(new XMLType(getClass().getResource(resource), path, pattern));
28 }
29 }
Stuart McCullochf3173222012-06-07 21:57:32 +000030
31}