if (newClassNames == null)
throw new NullPointerException(
"Styler specifies no CSS class names");
Matcher m = CssNamesPattern.matcher(newClassNames);
if (!m.matches())
throw new CreoleParseException(
"Malformatted class name(s): " + newClassNames);
classNames = newClassNames.split("\\s+", -1);
switch (directionChar) {
case '-':
targetDirection = Direction.PREVIOUS;
break;
case '=':
targetDirection = Direction.CONTAINER;
break;
case '+':
targetDirection = Direction.NEXT;
break;
default:
throw new CreoleParseException(
"Unexpected target direction specifier character: "
+ directionChar);
}
targetType = Enum.valueOf(TagType.class, tagTypeStr.toUpperCase());
if (targetType == null)
throw new CreoleParseException(
"Unexpected tag type specifier: " + tagTypeStr);
}