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

Method parsePCClassText

code/src/test/pcgen/util/TestHelper.java:563–581  ·  view source on GitHub ↗
(String classPCCText,
										   CampaignSourceEntry source)

Source from the content-addressed store, hash-verified

561 }
562
563 public static PCClass parsePCClassText(String classPCCText,
564 CampaignSourceEntry source) throws PersistenceLayerException
565 {
566 PCClassLoader pcClassLoader = new PCClassLoader();
567 PCClass reconstClass = null;
568 StringTokenizer tok = new StringTokenizer(classPCCText, "\n");
569 while (tok.hasMoreTokens())
570 {
571 String line = tok.nextToken();
572 if (!StringUtils.isBlank(line))
573 {
574 LOG.info("Processing line:'" + line + "'.");
575 reconstClass =
576 pcClassLoader.parseLine(Globals.getContext(),
577 reconstClass, line, source);
578 }
579 }
580 return reconstClass;
581 }
582
583 /**
584 * Evaluate a token, used in several "export" tests. By default, the token encoding is ignored.

Callers 1

additionalSetUpMethod · 0.95

Calls 4

parseLineMethod · 0.95
getContextMethod · 0.95
hasMoreTokensMethod · 0.80
nextTokenMethod · 0.80

Tested by

no test coverage detected