Returns the source map for the specified class. @param className the class name @return the source map, or null if not available
(String className)
| 116 | * @return the source map, or {@code null} if not available |
| 117 | */ |
| 118 | public SmapStratum getSmap(String className) { |
| 119 | |
| 120 | Map<String,SmapStratum> smaps = ctxt.getRuntimeContext().getSmaps(); |
| 121 | SmapStratum smap = smaps.get(className); |
| 122 | |
| 123 | if (smap == null && !options.isSmapSuppressed()) { |
| 124 | // Tomcat was restarted so cached SMAP has been lost. However, it |
| 125 | // was written to the class file so it can be recovered. |
| 126 | smap = SmapUtil.loadSmap(className, ctxt.getJspLoader()); |
| 127 | if (smap != null) { |
| 128 | smaps.put(className, smap); |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | return smap; |
| 133 | } |
| 134 | |
| 135 | |
| 136 | /** |
no test coverage detected