public Declaration getDeclaration(String name) { for (Declaration d : declarations.getDeclarations()) { if (d.getName().equalsIgnoreCase(name)) { return d; } } return null; }
public String getDeclarationsString(int nesting) { String start = Rule.getIndent(nesting); StringBuilder txt = new StringBuilder("{"); txt.append(declarations.innerString(nesting + 1)); txt.append("\n").append(start).append("}"); return txt.toString(); }