unit= (CompilationUnit) parser.createAST(null);
if (unit.getModule() != null) {
return Collections.singletonList(new ParsedCu(text, ASTParser.K_COMPILATION_UNIT, null, null, true));
List<BodyDeclaration> bodyDeclarations= ((TypeDeclaration) root).bodyDeclarations();
if (bodyDeclarations.size() > 0)
return Collections.singletonList(new ParsedCu(text, ASTParser.K_CLASS_BODY_DECLARATIONS, null, null));
List<Statement> statements= ((Block) root).statements();
if (statements.size() > 0)
return Collections.singletonList(new ParsedCu(text, ASTParser.K_STATEMENTS, null, null));