scope.setExclusions( new FileOfClasses( new ByteArrayInputStream(DEFAULT_EXCLUSIONS.getBytes(StandardCharsets.UTF_8))));
public AnalysisScope toAnalysisScope() throws IOException { AnalysisScope analysisScope = AnalysisScope.createJavaAnalysisScope(); analysisScope.setExclusions(exclusions); for (String moduleLine : moduleLinesList) { AnalysisScopeReader.processScopeDefLine(analysisScope, this.getClass().getClassLoader(), moduleLine); } for (String ldrLine : ldrImplLinesList) { AnalysisScopeReader.processScopeDefLine(analysisScope, this.getClass().getClassLoader(), ldrLine); } return analysisScope; }
public AnalysisScope toAnalysisScope() throws IOException { AnalysisScope analysisScope = AnalysisScope.createJavaAnalysisScope(); analysisScope.setExclusions(exclusions); for (String moduleLine : moduleLinesList) { AnalysisScopeReader.processScopeDefLine(analysisScope, this.getClass().getClassLoader(), moduleLine); } for (String ldrLine : ldrImplLinesList) { AnalysisScopeReader.processScopeDefLine(analysisScope, this.getClass().getClassLoader(), ldrLine); } return analysisScope; }
protected static AnalysisScope read(AnalysisScope scope, final URI scopeFileURI, final File exclusionsFile, ClassLoader javaLoader) throws IOException { BufferedReader r = null; try { String line; final InputStream inStream = scopeFileURI.toURL().openStream(); if (inStream == null) { throw new IllegalArgumentException("Unable to retrieve URI " + scopeFileURI.toString()); } r = new BufferedReader(new InputStreamReader(inStream, "UTF-8")); while ((line = r.readLine()) != null) { processScopeDefLine(scope, javaLoader, line); } if (exclusionsFile != null) { try (final InputStream fs = exclusionsFile.exists() ? new FileInputStream(exclusionsFile) : FileProvider.class.getClassLoader().getResourceAsStream(exclusionsFile.getName())) { scope.setExclusions(new FileOfClasses(fs)); } } } finally { if (r != null) { try { r.close(); } catch (IOException e) { e.printStackTrace(); } } } return scope; }
protected static AnalysisScope read(AnalysisScope scope, final URI scopeFileURI, final File exclusionsFile, ClassLoader javaLoader) throws IOException { BufferedReader r = null; try { String line; final InputStream inStream = scopeFileURI.toURL().openStream(); if (inStream == null) { throw new IllegalArgumentException("Unable to retrieve URI " + scopeFileURI.toString()); } r = new BufferedReader(new InputStreamReader(inStream, "UTF-8")); while ((line = r.readLine()) != null) { processScopeDefLine(scope, javaLoader, line); } if (exclusionsFile != null) { try (final InputStream fs = exclusionsFile.exists() ? new FileInputStream(exclusionsFile) : FileProvider.class.getClassLoader().getResourceAsStream(exclusionsFile.getName())) { scope.setExclusions(new FileOfClasses(fs)); } } } finally { if (r != null) { try { r.close(); } catch (IOException e) { e.printStackTrace(); } } } return scope; }
scope.setExclusions(new FileOfClasses(fs));
scope.setExclusions(new FileOfClasses(fs));
@Override public void buildAnalysisScope() throws IOException { try { ePath = createProjectPath(project); super.scope = ePath.toAnalysisScope(makeAnalysisScope()); if (getExclusionsFile() != null) { try (final InputStream is = new File(getExclusionsFile()).exists()? new FileInputStream(getExclusionsFile()): FileProvider.class.getClassLoader().getResourceAsStream(getExclusionsFile())) { scope.setExclusions(new FileOfClasses(is)); } } } catch (CoreException e) { assert false : e.getMessage(); } }
@Override public void buildAnalysisScope() throws IOException { scope = makeSourceAnalysisScope(); if (getExclusionsFile() != null) { try (final InputStream is = new File(getExclusionsFile()).exists()? new FileInputStream(getExclusionsFile()): FileProvider.class.getClassLoader().getResourceAsStream(getExclusionsFile())) { scope.setExclusions(new FileOfClasses(is)); } } for (Module M : this.systemEntries) { scope.addToScope(scope.getPrimordialLoader(), M); } // add user stuff addApplicationModulesToScope(); }
@Override public void buildAnalysisScope() throws IOException { scope = makeSourceAnalysisScope(); if (getExclusionsFile() != null) { try (final InputStream is = new File(getExclusionsFile()).exists()? new FileInputStream(getExclusionsFile()): FileProvider.class.getClassLoader().getResourceAsStream(getExclusionsFile())) { scope.setExclusions(new FileOfClasses(is)); } } for (Module M : this.systemEntries) { scope.addToScope(scope.getPrimordialLoader(), M); } // add user stuff addApplicationModulesToScope(); }
private static AnalysisScope findOrCreateAnalysisScope() throws IOException { if (cachedScope == null) { cachedScope = AnalysisScopeReader.readJavaScope(TestConstants.WALA_TESTDATA, null, SlicerTest.class.getClassLoader()); cachedScope.setExclusions(new FileOfClasses(new ByteArrayInputStream(EXCLUSIONS.getBytes("UTF-8")))); } return cachedScope; }
scope.setExclusions(new FileOfClasses(fs));
@BeforeClass public static void beforeClass() throws Exception { scope = AnalysisScopeReader.readJavaScope(TestConstants.WALA_TESTDATA, null, DataflowTest.class.getClassLoader()); scope.setExclusions(new FileOfClasses(new ByteArrayInputStream(EXCLUSIONS.getBytes("UTF-8")))); try { cha = ClassHierarchyFactory.make(scope); } catch (ClassHierarchyException e) { throw new Exception(e); } }
scope.setExclusions(new FileOfClasses(fs));