for (int i = 0; i < children.size(); i++) {
Node child = (Node) children.get(i);
if (child instanceof ClassNode) {
return (ClassNode) child;
} else if (child instanceof NewlineNode) {
NewlineNode nn = (NewlineNode) child;
Node found = findClassNode(nn.getNextNode());
if (found instanceof ClassNode) {
return (ClassNode) found;
}
}
}