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

Method unparseToken

code/src/java/plugin/bonustokens/Stat.java:88–109  ·  view source on GitHub ↗
(final Object obj)

Source from the content-addressed store, hash-verified

86 }
87
88 @Override
89 protected String unparseToken(final Object obj)
90 {
91 if (obj instanceof Integer)
92 {
93 return BONUS_TAGS[(Integer) obj];
94 }
95 else if (obj instanceof CastStat)
96 {
97 return "CAST." + ((CastStat) obj).getStat().getKeyName();
98 }
99 else if (obj instanceof PCClass)
100 {
101 return ((PCClass) obj).getKeyName();
102 }
103 else if (obj instanceof MissingObject)
104 {
105 return ((MissingObject) obj).getObjectName();
106 }
107
108 return ((PCStat) obj).getKeyName();
109 }
110
111 /**
112 * Deals with the Stat for casting.

Callers

nothing calls this directly

Calls 3

getKeyNameMethod · 0.65
getStatMethod · 0.45
getObjectNameMethod · 0.45

Tested by

no test coverage detected