@Test public void testPythonFilesInTinypy() throws FileAnalysisException { final FileAnalyzer f3 = FileAnalyzerFactory.buildFileAnalyzer( new File("src/test/resources/tiny_py_interpreter/tinypy/runtime/Errors.py")); final Map<ConstructId, Construct> c3 = f3.getConstructs(); assertEquals(15, c3.size()); }
@Override public Map<ConstructId, Construct> getConstructs() throws FileAnalysisException { if (this.constructs == null) { analyzer = PythonFileAnalyzer.createAnalyzer(this.file); analyzer.analyze(this.file); this.constructs = analyzer.getConstructs(); } return analyzer.getConstructs(); }
PythonFileAnalyzer implements FileAnalyzer { @Override public Map<ConstructId, Construct> getConstructs() throws FileAnalysisException { if (this.constructs == null) { analyzer = PythonFileAnalyzer.createAnalyzer(this.file); analyzer.analyze(this.file); this.constructs = analyzer.getConstructs(); } return analyzer.getConstructs(); } }
PythonFileAnalyzer implements FileAnalyzer { @Override public Map<ConstructId, Construct> getConstructs() throws FileAnalysisException { if (this.constructs == null) { analyzer = PythonFileAnalyzer.createAnalyzer(this.file); analyzer.analyze(this.file); this.constructs = analyzer.getConstructs(); } return analyzer.getConstructs(); }  }
PythonFileAnalyzer implements FileAnalyzer { @Override public Map<ConstructId, Construct> getConstructs() throws FileAnalysisException { if (this.constructs == null) { analyzer = PythonFileAnalyzer.createAnalyzer(this.file); analyzer.analyze(this.file); this.constructs = analyzer.getConstructs(); } return analyzer.getConstructs(); }  @Override String[] getSupportedFileExtensions(); @Override boolean canAnalyze(File _file); @Override void analyze(final File _file); @Override Map<ConstructId, Construct> getConstructs(); @Override boolean containsConstruct(ConstructId _id); @Override Construct getConstruct(ConstructId _id); @Override boolean hasChilds(); @Override Set<FileAnalyzer> getChilds(boolean _recursive); static PythonId getModule(File _file); static FileAnalyzer createAnalyzer(final File _file); static FileAnalyzer createAnalyzer(InputStream _is); }
PythonFileAnalyzer implements FileAnalyzer { @Override public Map<ConstructId, Construct> getConstructs() throws FileAnalysisException { if (this.constructs == null) { analyzer = PythonFileAnalyzer.createAnalyzer(this.file); analyzer.analyze(this.file); this.constructs = analyzer.getConstructs(); } return analyzer.getConstructs(); }  @Override String[] getSupportedFileExtensions(); @Override boolean canAnalyze(File _file); @Override void analyze(final File _file); @Override Map<ConstructId, Construct> getConstructs(); @Override boolean containsConstruct(ConstructId _id); @Override Construct getConstruct(ConstructId _id); @Override boolean hasChilds(); @Override Set<FileAnalyzer> getChilds(boolean _recursive); static PythonId getModule(File _file); static FileAnalyzer createAnalyzer(final File _file); static FileAnalyzer createAnalyzer(InputStream _is);  }