1
2
3
4
5
6 package gov.nist.secauto.metaschema.databind.model.info;
7
8 import java.io.IOException;
9 import java.util.List;
10 import java.util.Map;
11
12 import edu.umd.cs.findbugs.annotations.NonNull;
13 import edu.umd.cs.findbugs.annotations.Nullable;
14
15 public interface IModelInstanceReadHandler<ITEM> {
16 @Nullable
17 default ITEM readSingleton() throws IOException {
18 return readItem();
19 }
20
21 @NonNull
22 List<ITEM> readList() throws IOException;
23
24 @NonNull
25 Map<String, ITEM> readMap() throws IOException;
26
27
28
29
30
31
32
33
34
35 @Nullable
36 ITEM readItem() throws IOException;
37
38 @Nullable
39 String getJsonKeyFlagName();
40 }