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

Method unparse

code/src/java/plugin/lsttokens/race/FaceToken.java:104–127  ·  view source on GitHub ↗
(LoadContext context, LimitedVarContainer race)

Source from the content-addressed store, hash-verified

102 }
103
104 @Override
105 public String[] unparse(LoadContext context, LimitedVarContainer race)
106 {
107 VarModifier<?>[] added = race.getModifierArray();
108 String face = null;
109 if (added != null)
110 {
111 for (VarModifier<?> vm : added)
112 {
113 FormulaModifier<?> modifier = vm.getModifier();
114 if (CControl.FACE.getDefaultValue().equals(vm.getVarName())
115 && (!vm.getLegalScope().getParentScope().isPresent())
116 && (modifier.getIdentification().equals(MOD_IDENTIFICATION)))
117 {
118 face = modifier.getInstructions();
119 if (face.endsWith(",0"))
120 {
121 face = face.substring(0, face.length() - 2);
122 }
123 }
124 }
125 }
126 return (face == null) ? null : new String[]{face};
127 }
128
129 @Override
130 public Class<LimitedVarHolder> getTokenClass()

Callers

nothing calls this directly

Calls 10

isPresentMethod · 0.80
getModifierArrayMethod · 0.65
getModifierMethod · 0.65
equalsMethod · 0.65
getDefaultValueMethod · 0.65
getParentScopeMethod · 0.65
getIdentificationMethod · 0.65
getInstructionsMethod · 0.65
getVarNameMethod · 0.45
getLegalScopeMethod · 0.45

Tested by

no test coverage detected