JavaCore.setComplianceOptions(JavaCore.VERSION_1_6, options);
parser.setCompilerOptions(options);
CompilationUnit unit = (CompilationUnit) parser.createAST(null);
unit.recordModifications();
AST ast = unit.getAST();
// Package statement
// package astexplorer;
PackageDeclaration packageDeclaration = ast.newPackageDeclaration();
unit.setPackage(packageDeclaration);
// unit.se
packageDeclaration.setName(ast.newSimpleName(fileName));
// System.out.println("Filename: " + fileName);
// class declaration
// public class SampleComposite extends Composite {
TypeDeclaration classType = ast.newTypeDeclaration();
classType.setInterface(false);
// classType.s
classType.setName(ast.newSimpleName(fileName));
unit.types().add(classType);
// classType.setSuperclass(ast.newSimpleName("Composite"));
return new CompilationUnitImpl(unit);
}