if (getLanguage().isNamespaceDec(toplevelDecl)) {
processNamespaceDecl(toplevelDecl);
return Collections.emptyList();
}
IStrategoTerm dec = isApplication(toplevelDecl, "JavaTypeDec") ? getApplicationSubterm(toplevelDecl, "JavaTypeDec", 0) : toplevelDecl;
String decName = Term.asJavaString(dec.getSubterm(0).getSubterm(1).getSubterm(0));
String expectedDecName = FileCommands.fileName(javaOutFile);
if (expectedDecName != null && !expectedDecName.equals(decName))
throw new RuntimeException("Declaration name '" + decName + "'" + " does not match the file name '" + expectedDecName + "'.");
body.add(prettyPrint(dec));