use of pcgen.cdom.enumeration.KitApply in project pcgen by PCGen.
the class ApplyToken method parseNonEmptyToken.
@Override
protected ParseResult parseNonEmptyToken(LoadContext context, Kit kit, String value) {
try {
KitApply ka = KitApply.valueOf(value);
kit.put(ObjectKey.APPLY_MODE, ka);
return ParseResult.SUCCESS;
} catch (IllegalArgumentException e) {
return new ParseResult.Fail(getTokenName() + " encountered unexpected application type: " + value, context);
}
}
Aggregations