Example usage for java.lang Package Package

List of usage examples for java.lang Package Package

Introduction

In this page you can find the example usage for java.lang Package Package.

Prototype

Package(String name, String spectitle, String specversion, String specvendor, String impltitle,
        String implversion, String implvendor, URL sealbase, ClassLoader loader) 

Source Link

Document

Construct a package instance for an unnamed module with the specified version information.

Usage

From source file:at.yawk.buycraft.BuycraftApiImpl.java

@Override
public Set<Package> packages() throws IOException {
    JsonObject object = get("packages");
    Set<Package> packages = new HashSet<>();
    object.getAsJsonArray("payload").forEach(ele -> {
        JsonObject entry = ele.getAsJsonObject();
        Package pack = new Package(entry.get("id").getAsInt(), entry.get("order").getAsInt(),
                entry.get("name").getAsString(), entry.get("description").getAsString(),
                entry.get("shortDescription").getAsString(), entry.get("price").getAsString(),
                entry.get("category").getAsInt(), entry.get("guiItemId").getAsInt(),
                entry.get("itemId").getAsString());
        packages.add(pack);//from   www  .jav a 2s  .c o m
    });
    return packages;
}