List<AJCMethodDecl> methodDefs = List.nil();
List<AJCClassDecl> classDefs = List.nil();
int requiredDefs = jcClassDecl.defs.size();
while (requiredDefs > 0) {
AJCTree decl = results.pop();
if (decl instanceof AJCVariableDecl) {
varDefs = varDefs.prepend((AJCVariableDecl) decl);
} else if (decl instanceof AJCMethodDecl) {
methodDefs = methodDefs.prepend((AJCMethodDecl) decl);
} else if (decl instanceof AJCClassDecl) {