Stuart McCulloch | 26e7a5a | 2011-10-17 10:31:43 +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 | |
| 8 | public class XMLTypeProcessor implements AnalyzerPlugin { |
| 9 | |
| 10 | public boolean analyzeJar(Analyzer analyzer) throws Exception { |
| 11 | List<XMLType> types = getTypes(analyzer); |
| 12 | for ( XMLType type : types ) { |
| 13 | type.analyzeJar(analyzer); |
| 14 | } |
| 15 | return false; |
| 16 | } |
| 17 | |
| 18 | protected List<XMLType> getTypes(Analyzer analyzer) throws Exception { |
| 19 | return new ArrayList<XMLType>(); |
| 20 | } |
| 21 | |
| 22 | |
| 23 | protected void process(List<XMLType> types, String resource, String paths, |
| 24 | String pattern) throws Exception { |
| 25 | |
| 26 | Map<String,Map<String,String>> map = Processor.parseHeader(paths,null); |
| 27 | for ( String path : map.keySet() ) { |
| 28 | types.add( new XMLType( getClass().getResource(resource), path, pattern )); |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | |
| 33 | } |