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

Method getToken

code/src/java/plugin/exporttokens/ACToken.java:37–53  ·  view source on GitHub ↗
(String tokenSource, PlayerCharacter pc, ExportHandler eh)

Source from the content-addressed store, hash-verified

35 }
36
37 @Override
38 public String getToken(String tokenSource, PlayerCharacter pc, ExportHandler eh)
39 {
40 String solverValue = pc.getControl("ACVAR" + tokenSource);
41 int intValue;
42 if (solverValue != null)
43 {
44 Object val = pc.getGlobal(solverValue);
45 intValue = ((Number) val).intValue();
46 }
47 else
48 {
49 String acTypeKey = SettingsHandler.getGameAsProperty().get().getACTypeName(tokenSource.substring(3));
50 intValue = pc.getDisplay().calcACOfType(acTypeKey);
51 }
52 return Integer.toString(intValue);
53 }
54}

Callers

nothing calls this directly

Calls 9

getGameAsPropertyMethod · 0.95
getControlMethod · 0.80
intValueMethod · 0.80
getACTypeNameMethod · 0.80
getMethod · 0.65
toStringMethod · 0.65
getGlobalMethod · 0.45
calcACOfTypeMethod · 0.45
getDisplayMethod · 0.45

Tested by

no test coverage detected