Use common library to read file content.
[javainspect.git] / src / main / java / eu / svjatoslav / inspector / java / methods / Project.java
old mode 100644 (file)
new mode 100755 (executable)
index 5387cf4..6a3fb2e
@@ -1,51 +1,19 @@
-package eu.svjatoslav.inspector.java.methods;
+/*
+ * JavaInspect - Utility to visualize java software
+ * Copyright (C) 2013-2020, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 3 of the GNU Lesser General Public License
+ * or later as published by the Free Software Foundation.
+ */
 
-import java.io.File;
+package eu.svjatoslav.inspector.java.methods;
 
-import eu.svjatoslav.commons.file.FilePathParser;
+import java.util.HashMap;
+import java.util.Map;
 
 public class Project {
 
-       private final File projectPath;
-
-       public Project(final File projectPath) {
-               this.projectPath = projectPath;
-               parse();
-       }
-
-       public void parse() {
-
-               if (!projectPath.exists())
-                       System.out.println("Project not found on path: " + projectPath);
-
-               if (!projectPath.canRead())
-                       System.out.println("Cannot read project path: " + projectPath);
-
-               if (projectPath.isDirectory())
-                       parseDirectory(projectPath);
-
-               if (projectPath.isFile())
-                       parseFile(projectPath);
-       }
-
-       public void parseDirectory(final File file) {
-
-               for (final File subFile : file.listFiles()) {
-
-                       if (subFile.isFile())
-                               parseFile(subFile);
-
-                       if (subFile.isDirectory())
-                               parseDirectory(subFile);
-               }
-       }
-
-       public void parseFile(final File file) {
-               final String fileExtension = FilePathParser.getFileExtension(file);
-               if ("java".equalsIgnoreCase(fileExtension)){
-                       JavaFile javaFile = new JavaFile(file);
-                       // oeu
-               }
-       }
+    Map<String, Package> packages = new HashMap<>();
 
 }