use of de.fraunhofer.aisec.cpg.TranslationConfiguration in project cpg by Fraunhofer-AISEC.
the class DemoTests method testHierarchy.
@Test
void testHierarchy() throws Exception {
Path topLevel = Paths.get("src/test/resources/compiling/hierarchy");
File[] files = Files.walk(topLevel, Integer.MAX_VALUE).map(Path::toFile).filter(File::isFile).filter(f -> f.getName().endsWith(".java")).toArray(File[]::new);
TranslationConfiguration config = TranslationConfiguration.builder().sourceLocations(files).topLevel(topLevel.toFile()).defaultPasses().defaultLanguages().debugParser(true).failOnError(true).build();
TranslationManager analyzer = TranslationManager.builder().config(config).build();
var result = analyzer.analyze().get();
}
Aggregations