(LoadContext context, CDOMObject obj)
| 122 | } |
| 123 | |
| 124 | @Override |
| 125 | public boolean process(LoadContext context, CDOMObject obj) |
| 126 | { |
| 127 | List<BonusObj> bonusList = obj.getListFor(ListKey.BONUS); |
| 128 | boolean returnValue = true; |
| 129 | if (bonusList != null) |
| 130 | { |
| 131 | for (BonusObj bonus : bonusList) |
| 132 | { |
| 133 | String bonusName = bonus.getBonusName(); |
| 134 | if ("ABILITYPOOL".equalsIgnoreCase(bonusName)) |
| 135 | { |
| 136 | for (Object o : bonus.getBonusInfoList()) |
| 137 | { |
| 138 | if (context.getReferenceContext().silentlyGetConstructedCDOMObject(ABILITY_CATEGORY_CLASS, |
| 139 | o.toString()) == null) |
| 140 | { |
| 141 | LoadContext dummyCtx = new RuntimeLoadContext(context.getReferenceContext(), |
| 142 | new ConsolidatedListCommitStrategy()); |
| 143 | dummyCtx.setSourceURI(obj.getSourceURI()); |
| 144 | Logging.errorPrint("BONUS: " + bonus + " in " + obj.getClass().getSimpleName() + ' ' |
| 145 | + obj.getKeyName() + " contained an invalid AbilityCategory " + o.toString(), dummyCtx); |
| 146 | returnValue = false; |
| 147 | } |
| 148 | } |
| 149 | } |
| 150 | else if ("UDAM".equals(bonusName)) |
| 151 | { |
| 152 | for (Object o : bonus.getBonusInfoList()) |
| 153 | { |
| 154 | String classKey = o.toString(); |
| 155 | final PCClass aClass = |
| 156 | context.getReferenceContext().silentlyGetConstructedCDOMObject(PCCLASS_CLASS, classKey); |
| 157 | if (aClass == null) |
| 158 | { |
| 159 | Logging.errorPrint("Could not find class '" + classKey + "' for UDAM token", context); |
| 160 | } |
| 161 | } |
| 162 | } |
| 163 | } |
| 164 | } |
| 165 | try |
| 166 | { |
| 167 | obj.ownBonuses(obj); |
| 168 | } |
| 169 | catch (CloneNotSupportedException e) |
| 170 | { |
| 171 | Logging.errorPrint(e.getLocalizedMessage()); |
| 172 | return false; |
| 173 | } |
| 174 | return returnValue; |
| 175 | } |
| 176 | |
| 177 | @Override |
| 178 | public Class<CDOMObject> getDeferredTokenClass() |
nothing calls this directly
no test coverage detected