01: /*
02: * Created on Sep 22, 2004
03: */
04: package uk.org.ponder.saxalizer.mapping;
05:
06: import java.util.Map;
07:
08: /**
09: * Holds details of dynamic mappings between Java classes and
10: * XML representations.
11: * @author Antranig Basman (antranig@caret.cam.ac.uk)
12: */
13: public class SAXalizerMapper {
14: public SAXalizerMapper(Map concurrentmap) {
15: this .handlermap = concurrentmap;
16: }
17:
18: // This is a hashmap of java classes to SAXalizerMapperEntries.
19: private Map handlermap;
20:
21: public void addEntry(SAXalizerMapperEntry entry) {
22: handlermap.put(entry.targetclass, entry);
23: }
24:
25: public SAXalizerMapperEntry byClass(Class clazz) {
26: SAXalizerMapperEntry togo = (SAXalizerMapperEntry) handlermap
27: .get(clazz);
28: return togo;
29: }
30: }
|