public String getFileName() { return entry.getName(); }
@Override public String file() { return module.getName(); }
public String getFileName() { return entry.getName(); }
@Override public String file() { return module.getName(); }
private static boolean isPrologueScript(WalkContext context) { return JavaScriptLoader.bootstrapFileNames.contains( context.getModule().getName() ); }
@Override public String getSourceFileName(IClass klass) { if (klass == null) { throw new IllegalArgumentException("klass is null"); } ModuleEntry e = sourceMap.get(klass.getName()); return e == null ? null : e.getName(); }
@Override public String getSourceFileName(IClass klass) { if (klass == null) { throw new IllegalArgumentException("klass is null"); } ModuleEntry e = sourceMap.get(klass.getName()); return e == null ? null : e.getName(); }
private static boolean isPrologueScript(WalkContext context) { return JavaScriptLoader.bootstrapFileNames.contains( context.getModule().getName() ); }
public static void checkForFrontEndErrors(IClassHierarchy cha) throws WalaException { StringBuilder message = null; for(IClassLoader loader : cha.getLoaders()) { if (loader instanceof CAstAbstractLoader) { Iterator<ModuleEntry> errors = ((CAstAbstractLoader)loader).getModulesWithParseErrors(); if (errors.hasNext()) { if (message == null) { message = new StringBuilder("front end errors:\n"); } while (errors.hasNext()) { ModuleEntry errorModule = errors.next(); for(Warning w : (((CAstAbstractLoader)loader).getMessages(errorModule))) { message.append("error in ").append(errorModule.getName()).append(":\n"); message.append(w.toString()).append('\n'); } } } // clear out the errors to free some memory ((CAstAbstractLoader)loader).clearMessages(); } } if (message != null) { message.append("end of front end errors\n"); throw new WalaException(String.valueOf(message)); } }
public static void checkForFrontEndErrors(IClassHierarchy cha) throws WalaException { StringBuilder message = null; for(IClassLoader loader : cha.getLoaders()) { if (loader instanceof CAstAbstractLoader) { Iterator<ModuleEntry> errors = ((CAstAbstractLoader)loader).getModulesWithParseErrors(); if (errors.hasNext()) { if (message == null) { message = new StringBuilder("front end errors:\n"); } while (errors.hasNext()) { ModuleEntry errorModule = errors.next(); for(Warning w : (((CAstAbstractLoader)loader).getMessages(errorModule))) { message.append("error in ").append(errorModule.getName()).append(":\n"); message.append(w.toString()).append('\n'); } } } // clear out the errors to free some memory ((CAstAbstractLoader)loader).clearMessages(); } } if (message != null) { message.append("end of front end errors\n"); throw new WalaException(String.valueOf(message)); } }
@SuppressWarnings("unused") private Map<String, Map<String, Long>> getEntrySizes(Module module, String name) { Map<String, Map<String, Long>> result = HashMapFactory.make(); Map<String, Long> curFileResult = HashMapFactory.make(); for (ModuleEntry e : Iterator2Iterable.make(module.getEntries())) { if (e.isModuleFile()) { result.putAll(getEntrySizes(e.asModule(), e.getName())); } else { if (e instanceof JarFileEntry) { curFileResult.put(e.getName(), ((JarFileEntry) e).getSize()); } } } result.put(name, curFileResult); return result; }
public CAstRhinoTranslator(ModuleEntry m, boolean replicateForDoLoops) { super(m, new RhinoToAstTranslator(new CAstImpl(), m, m.getName(), replicateForDoLoops)); } }
@SuppressWarnings("unused") private Map<String, Map<String, Long>> getEntrySizes(Module module, String name) { Map<String, Map<String, Long>> result = HashMapFactory.make(); Map<String, Long> curFileResult = HashMapFactory.make(); for (ModuleEntry e : Iterator2Iterable.make(module.getEntries())) { if (e.isModuleFile()) { result.putAll(getEntrySizes(e.asModule(), e.getName())); } else { if (e instanceof JarFileEntry) { curFileResult.put(e.getName(), ((JarFileEntry) e).getSize()); } } } result.put(name, curFileResult); return result; }
@Override public TranslatorToCAst make(CAst ast, final ModuleEntry M) { String N; if (M instanceof SourceFileModule) { N = ((SourceFileModule) M).getClassName(); } else { N = M.getName(); } TranslatorToCAst xlator = translateInternal(ast, (SourceModule)M, N); xlator.addRewriter(ast1 -> new AstLoopUnwinder(ast1, true, unwindFactor), false); return xlator; } }
@Override public TranslatorToCAst make(CAst ast, final ModuleEntry M) { String N; if (M instanceof SourceFileModule) { N = ((SourceFileModule) M).getClassName(); } else { N = M.getName(); } TranslatorToCAst xlator = translateInternal(ast, (SourceModule)M, N); xlator.addRewriter(ast1 -> new AstLoopUnwinder(ast1, true, unwindFactor), false); return xlator; } }
final Object contents = fileContents.get(entry.getName()); if (contents != null) {
final Object contents = fileContents.get(entry.getName()); if (contents != null) {