added documentation comments, added vars and edited params
This commit is contained in:
parent
5bfa9c8f0f
commit
182274a57c
@ -1,14 +1,17 @@
|
|||||||
package fr.packageviewer.ArchParser;
|
package fr.packageviewer.ArchParser;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.util.List;
|
||||||
import java.net.MalformedURLException;
|
|
||||||
import java.net.URL;
|
|
||||||
import java.net.URLConnection;
|
|
||||||
import java.util.Scanner;
|
|
||||||
|
|
||||||
public class ArchParser {
|
public class ArchParser {
|
||||||
|
/**
|
||||||
|
* Will parse the given json and store data in a Package
|
||||||
|
* @param json the given json string
|
||||||
|
* @param depth depth to search dependencies
|
||||||
|
* @return new Package
|
||||||
|
*/
|
||||||
|
|
||||||
public static Package getPackageTree(String packageName, int deph){
|
public static Package getPackageTree(String json, int depth){
|
||||||
|
String name, version, repo, description;
|
||||||
|
List<Package> deps;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,14 +6,14 @@ public class Package {
|
|||||||
String name;
|
String name;
|
||||||
String version;
|
String version;
|
||||||
String repo;
|
String repo;
|
||||||
String desciption;
|
String description;
|
||||||
List<Package> deps;
|
List<Package> deps;
|
||||||
|
|
||||||
public Package(String name, String version, String repo, String desciption) {
|
public Package(String name, String version, String repo, String desciption) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.version = version;
|
this.version = version;
|
||||||
this.repo = repo;
|
this.repo = repo;
|
||||||
this.desciption = desciption;
|
this.description = desciption;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user