Class JsonDescriptorScanner
-
- All Implemented Interfaces:
-
de.griefed.serverpackcreator.api.modscanning.ModJarScanner
public abstract class JsonDescriptorScanner extends DescriptorScanner
Base for scanners whose descriptor is JSON: adds Jackson reading to the per-jar failure handling of DescriptorScanner, so subclasses implement read for a single jar and may throw freely.
Griefed
-
-
Field Summary
Fields Modifier and Type Field Description private final StringscanAnnouncement
-
Constructor Summary
Constructors Constructor Description JsonDescriptorScanner()
-
Method Summary
Modifier and Type Method Description StringgetScanAnnouncement()final JsonNodegetJarJson(File file, String entryInJar, ObjectMapper objectMapper)Acquire a JsonNode from the specified entry in the specified jar. -
-
Method Detail
-
getScanAnnouncement
String getScanAnnouncement()
-
getJarJson
final JsonNode getJarJson(File file, String entryInJar, ObjectMapper objectMapper)
Acquire a JsonNode from the specified entry in the specified jar.
- Parameters:
file- The jar from which to get the JsonNode.entryInJar- The entry in the jar from which to get the JsonNode.objectMapper- The ObjectMapper with which to parse the JSON to a JsonNode.- Returns:
A JsonNode containing all information from the requested entry in the specified jar.
-
-
-
-