clean up load additional file
This commit is contained in:
parent
5eb1c7bc1d
commit
7928e57435
|
@ -165,16 +165,19 @@ public class JSCallGraphUtil extends com.ibm.wala.cast.ipa.callgraph.CAstCallGra
|
|||
/**
|
||||
* @param cha
|
||||
* @param cl
|
||||
* @param fileName
|
||||
* @param url
|
||||
* @return The set of class names that where defined in the CHA as a result
|
||||
* loading process.
|
||||
* @throws IOException
|
||||
*/
|
||||
public static Set<String> loadAdditionalFile(IClassHierarchy cha, JavaScriptLoader cl, String fileName, URL url)
|
||||
public static Set<String> loadAdditionalFile(IClassHierarchy cha, JavaScriptLoader cl, URL url)
|
||||
throws IOException {
|
||||
return loadAdditionalFile(cha, cl, new SourceURLModule(url));
|
||||
}
|
||||
|
||||
public static Set<String> loadAdditionalFile(IClassHierarchy cha, JavaScriptLoader cl, SourceModule M)
|
||||
throws IOException {
|
||||
try {
|
||||
SourceURLModule M = new SourceURLModule(url);
|
||||
TranslatorToCAst toCAst = getTranslatorFactory().make(new CAstImpl(), M);
|
||||
final Set<String> names = new HashSet<String>();
|
||||
JSAstTranslator toIR = new JSAstTranslator(cl) {
|
||||
|
|
|
@ -443,7 +443,7 @@ public class JavaScriptConstructorFunctions {
|
|||
FO.write(fun.toString());
|
||||
FO.close();
|
||||
|
||||
Set<String> fnNames = JSCallGraphUtil.loadAdditionalFile(cha, cl, fileName, f.toURI().toURL());
|
||||
Set<String> fnNames = JSCallGraphUtil.loadAdditionalFile(cha, cl, f.toURI().toURL());
|
||||
IClass fcls = null;
|
||||
for(String nm : fnNames) {
|
||||
if (nm.endsWith("_fromctor")) {
|
||||
|
|
Loading…
Reference in New Issue