Stuart McCulloch | f317322 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 1 | package aQute.lib.spring; |
| 2 | |
| 3 | import java.util.*; |
| 4 | |
| 5 | import aQute.bnd.service.*; |
| 6 | import aQute.lib.osgi.*; |
| 7 | import aQute.libg.header.*; |
| 8 | |
| 9 | public class XMLTypeProcessor implements AnalyzerPlugin { |
Stuart McCulloch | f317322 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 10 | |
Stuart McCulloch | 4482c70 | 2012-06-15 13:27:53 +0000 | [diff] [blame^] | 11 | 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 McCulloch | f317322 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 18 | |
Stuart McCulloch | 4482c70 | 2012-06-15 13:27:53 +0000 | [diff] [blame^] | 19 | protected List<XMLType> getTypes(Analyzer analyzer) throws Exception { |
| 20 | return new ArrayList<XMLType>(); |
| 21 | } |
Stuart McCulloch | f317322 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 22 | |
Stuart McCulloch | 4482c70 | 2012-06-15 13:27:53 +0000 | [diff] [blame^] | 23 | 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 McCulloch | f317322 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 30 | |
| 31 | } |