Change-Id: I2d667fe8c7ddb9c18d521a314f9b00c133141b6a
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
importedModules = «Collections.importedName».emptySet();
«ENDIF»
importedModules = «Collections.importedName».emptySet();
«ENDIF»
- «val path = m.moduleSourcePath.replace(java.io.File.separatorChar, '/')»
- «InputStream.importedName» stream = «CLASS».class.getResourceAsStream("«path»");
+ «InputStream.importedName» stream = «CLASS».class.getResourceAsStream("«sourcePath»");
- throw new IllegalStateException("Resource «path» is missing");
+ throw new IllegalStateException("Resource «sourcePath» is missing");
@Override
public «InputStream.importedName» getModuleSourceStream() throws IOException {
@Override
public «InputStream.importedName» getModuleSourceStream() throws IOException {
- «InputStream.importedName» stream = «CLASS».class.getResourceAsStream("«path»");
+ «InputStream.importedName» stream = «CLASS».class.getResourceAsStream("«sourcePath»");
- throw new «IOException.importedName»("Resource «path» is missing");
+ throw new «IOException.importedName»("Resource «sourcePath» is missing");
return importedModules;
}
'''
return importedModules;
}
'''
+
+ def getSourcePath() {
+ return "/" + module.moduleSourcePath.replace(java.io.File.separatorChar, '/')
+ }
private def imports() '''
«IF !importMap.empty»
private def imports() '''
«IF !importMap.empty»