if (!declarations.isEmpty())
{
AbstractTypeDeclaration declaration = declarations.get(0);
return getJavaSource(null, document, unit, declaration);
}
throw new ParserException("Could not find type declaration in Java source - is this actually code?");
}