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

Method getToken

code/src/java/pcgen/io/exporttoken/AbilityToken.java:108–122  ·  view source on GitHub ↗
(String tokenSource, PlayerCharacter pc, ExportHandler eh)

Source from the content-addressed store, hash-verified

106 }
107
108 @Override
109 public String getToken(String tokenSource, PlayerCharacter pc, ExportHandler eh)
110 {
111 // Skip the ABILITY token itself
112 final StringTokenizer aTok = new StringTokenizer(tokenSource, ".");
113 final String tokenString = aTok.nextToken();
114
115 // Get the Ability Category from the Gamemode given the key
116 final String categoryString = aTok.nextToken();
117 final AbilityCategory aCategory = "ANY".equals(categoryString) ? AbilityCategory.ANY
118 : SettingsHandler.getGameAsProperty().get().getAbilityCategory(categoryString);
119
120 // Get the ABILITY token for the category
121 return getTokenForCategory(tokenSource, pc, eh, aTok, tokenString, aCategory);
122 }
123
124 /**
125 * Produce the ABILITY token output for a specific ability category.

Callers 9

testAspectMethod · 0.95
testAspectCountMethod · 0.95
testSingleAspectMethod · 0.95
testHasAspectMethod · 0.95
testNameMethod · 0.95
testKeyMethod · 0.95
testAssociatedMethod · 0.95
testAssociatedCountMethod · 0.95

Calls 6

getGameAsPropertyMethod · 0.95
getTokenForCategoryMethod · 0.95
nextTokenMethod · 0.80
equalsMethod · 0.65
getMethod · 0.65
getAbilityCategoryMethod · 0.45

Tested by 9

testAspectMethod · 0.76
testAspectCountMethod · 0.76
testSingleAspectMethod · 0.76
testHasAspectMethod · 0.76
testNameMethod · 0.76
testKeyMethod · 0.76
testAssociatedMethod · 0.76
testAssociatedCountMethod · 0.76