*/
public void ignorableAtRule(String atRule) throws CSSException {
int idx = atRule.indexOf(" ");
if (idx == -1) {
// Empty rule like @foo;
addNode(new CssUnknownAtRule(atRule));
return;
}
String ruleName = atRule.substring(1, idx);
String methodName = "parse" + (Character.toUpperCase(ruleName.charAt(0)))
+ StringCase.toLower(ruleName.substring(1));
try {
Method parseMethod = getClass().getDeclaredMethod(methodName,
String.class);
parseMethod.invoke(this, atRule);
} catch (NoSuchMethodException e) {
// A rule like @-webkit-keyframe {...} that we can't process
addNode(new CssUnknownAtRule(atRule));
} catch (IllegalAccessException e) {
errors.log(TreeLogger.ERROR, "Unable to invoke parse method ", e);
} catch (InvocationTargetException e) {
Throwable cause = e.getCause();