MCPcopy Create free account
hub / github.com/PCGen/pcgen / unparse

Method unparse

code/src/java/plugin/lsttokens/AllowLst.java:54–69  ·  view source on GitHub ↗
(LoadContext context, CDOMObject obj)

Source from the content-addressed store, hash-verified

52 }
53
54 @Override
55 public String[] unparse(LoadContext context, CDOMObject obj)
56 {
57 Changes<InfoBoolean> changes = context.getObjectContext().getListChanges(obj, ListKey.ALLOW);
58 if (changes == null || changes.isEmpty())
59 {
60 return null;
61 }
62 List<String> items = new ArrayList<>();
63 for (InfoBoolean info : changes.getAdded())
64 {
65 //This is correct - NEPFormula unparses to its instructions with toString()
66 items.add(info.getInfoName() + Constants.PIPE + info.getFormula());
67 }
68 return items.toArray(new String[0]);
69 }
70
71 @Override
72 protected char separator()

Callers

nothing calls this directly

Calls 8

getInfoNameMethod · 0.80
getListChangesMethod · 0.65
getObjectContextMethod · 0.65
isEmptyMethod · 0.65
getAddedMethod · 0.65
addMethod · 0.65
getFormulaMethod · 0.65
toArrayMethod · 0.45

Tested by

no test coverage detected