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

Method makeAbility

code/src/test/pcgen/util/TestHelper.java:256–267  ·  view source on GitHub ↗

Set the important info about a Skill @param name The skill name @param cat the category of this Ability @param type The type info ("." separated) @return The ability (which has also been added to global storage

(final String name, final String cat, final String type)

Source from the content-addressed store, hash-verified

254 * @return The ability (which has also been added to global storage
255 */
256 public static Ability makeAbility(final String name, final String cat, final String type)
257 {
258 AbilityCategory useCat = Globals.getContext().getReferenceContext()
259 .constructNowIfNecessary(AbilityCategory.class, cat);
260 final Ability anAbility = new Ability();
261 anAbility.setName(name);
262 anAbility.put(StringKey.KEY_NAME, ("KEY_" + name));
263 anAbility.setCDOMCategory(useCat);
264 addType(anAbility, type);
265 Globals.getContext().getReferenceContext().importObject(anAbility);
266 return anAbility;
267 }
268
269 /**
270 * Set the important info about a Skill

Callers 15

setUpMethod · 0.95
setUpMethod · 0.95
setUpMethod · 0.95
testGetChoicesMethod · 0.95
testEmptyDescMethod · 0.95

Calls 8

getContextMethod · 0.95
setCDOMCategoryMethod · 0.95
addTypeMethod · 0.95
importObjectMethod · 0.80
getReferenceContextMethod · 0.65
setNameMethod · 0.65
putMethod · 0.65

Tested by

no test coverage detected