public void visitBinaryResource(@NonNull ResourceContext context) { if (binaryDetectors == null) { return; } for (Detector check : binaryDetectors) { check.beforeCheckFile(context); check.checkBinaryResource(context); check.afterCheckFile(context); } } }
private void checkPropertyFile(Project project, Project main, List<Detector> detectors, String relativePath) { File file = new File(project.getDir(), relativePath); if (file.exists()) { Context context = new Context(this, project, main, file); fireEvent(EventType.SCANNING_FILE, context); for (Detector detector : detectors) { detector.beforeCheckFile(context); detector.run(context); detector.afterCheckFile(context); } } }
check.afterCheckFile(context);
private void checkProGuard(Project project, Project main) { List<Detector> detectors = scopeDetectors.get(Scope.PROGUARD_FILE); if (detectors != null) { List<File> files = project.getProguardFiles(); for (File file : files) { Context context = new Context(this, project, main, file); fireEvent(EventType.SCANNING_FILE, context); for (Detector detector : detectors) { detector.beforeCheckFile(context); detector.run(context); detector.afterCheckFile(context); } } } }
private void checkBuildScripts(Project project, Project main) { List<Detector> detectors = scopeDetectors.get(Scope.GRADLE_FILE); if (detectors != null) { List<File> files = project.getSubset(); if (files == null) { files = project.getGradleBuildScripts(); } for (File file : files) { Context context = new Context(this, project, main, file); fireEvent(EventType.SCANNING_FILE, context); for (Detector detector : detectors) { detector.beforeCheckFile(context); detector.visitBuildScript(context, Maps.newHashMap()); detector.afterCheckFile(context); } } } }
detector.beforeCheckFile(context); detector.run(context); detector.afterCheckFile(context);
check.afterCheckFile(context);
Detector.ClassScanner scanner = (Detector.ClassScanner) detector; scanner.checkClass(context, classNode); detector.afterCheckFile(context); detector.afterCheckFile(context);
detector.beforeCheckFile(context); detector.run(context); detector.afterCheckFile(context);
v.getDetector().afterCheckFile(context);
check.beforeCheckFile(context); check.checkFolder(context, folderName); check.afterCheckFile(context);
v.getDetector().afterCheckFile(context);