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

Method parseNonEmptyToken

code/src/java/plugin/lsttokens/TempdescLst.java:45–55  ·  view source on GitHub ↗
(LoadContext context, CDOMObject obj, String value)

Source from the content-addressed store, hash-verified

43 }
44
45 @Override
46 protected ParseResult parseNonEmptyToken(LoadContext context, CDOMObject obj, String value)
47 {
48 if ((obj instanceof Ungranted) && !(obj instanceof Spell))
49 {
50 return new ParseResult.Fail(
51 "Cannot use " + getTokenName() + " on an Ungranted object type: " + obj.getClass().getSimpleName());
52 }
53 context.getObjectContext().put(obj, StringKey.TEMP_DESCRIPTION, EntityEncoder.decode(value));
54 return ParseResult.SUCCESS;
55 }
56
57 @Override
58 public String[] unparse(LoadContext context, CDOMObject obj)

Callers

nothing calls this directly

Calls 5

getTokenNameMethod · 0.95
decodeMethod · 0.95
getSimpleNameMethod · 0.80
putMethod · 0.65
getObjectContextMethod · 0.65

Tested by

no test coverage detected