|
| void | parse (JsonObject data) |
| | The method allows a user to modify the data as its being parsed.
|
| void | onEnd () |
| | This method handles what happens after the parser has ended.
|
|
| transient Gson | builder |
| | The Gson object.
|
| int | index |
| | The index of the current line being parsed.
|
| final Path | path |
| | The path of the file to parse.
|
Definition at line 10 of file EquipmentParser.java.
◆ EquipmentParser()
| com.runehive.util.parser.old.EquipmentParser.EquipmentParser |
( |
| ) |
|
◆ parse()
| void com.runehive.util.parser.old.EquipmentParser.parse |
( |
JsonObject | data | ) |
|
|
protected |
The method allows a user to modify the data as its being parsed.
- Parameters
-
| data | The JsonObject that contains all serialized information. |
Reimplemented from com.runehive.util.parser.GsonParser.
Definition at line 19 of file EquipmentParser.java.
19 {
20 final int id = data.get("id").getAsInt();
21 SkillRequirement[] requirement = new SkillRequirement[] {};
22
23 if (data.has("requirements")) {
24 requirement = builder.fromJson(data.get("requirements"), SkillRequirement[].class);
25 }
26
27 LOADED.put(id, new Loader(id, requirement));
28 }
References com.runehive.util.parser.GsonParser.builder, and LOADED.
◆ LOADED
| Map<Integer, Loader> com.runehive.util.parser.old.EquipmentParser.LOADED = new HashMap<>() |
|
static |
The documentation for this class was generated from the following file: