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

Method parseToken

code/src/java/plugin/bonustokens/SkillRank.java:32–51  ·  view source on GitHub ↗
(LoadContext context, final String token)

Source from the content-addressed store, hash-verified

30 private static final Class<pcgen.core.Skill> SKILL_CLASS = pcgen.core.Skill.class;
31
32 @Override
33 protected boolean parseToken(LoadContext context, final String token)
34 {
35 if (token.startsWith(Constants.LST_TYPE_EQUAL))
36 {
37 addBonusInfo(token.replace('=', '.'));
38 }
39 else
40 {
41 addBonusInfo(token);
42 }
43
44 if (!token.equals("LIST") && !token.equals("%LIST") && !token.equals("%CHOICE") && !token.equals("%VAR"))
45 {
46 //This is done entirely for the side effects
47 context.forgetMeNot(TokenUtilities.getReference(context, SKILL_CLASS, token));
48 }
49
50 return true;
51 }
52
53 @Override
54 protected String unparseToken(final Object obj)

Callers

nothing calls this directly

Calls 5

getReferenceMethod · 0.95
addBonusInfoMethod · 0.80
equalsMethod · 0.65
forgetMeNotMethod · 0.65
replaceMethod · 0.45

Tested by

no test coverage detected