protected PackageMetadata createPackageMetadata( CompilationUnit unit ) {
PackageMetadata packageMetadata = null;
List<Annotation> annotations = null;
PackageDeclaration packageDeclaration = unit.getPackage();
if (packageDeclaration != null) {
annotations = packageDeclaration.annotations();
packageMetadata = new PackageMetadata();
packageMetadata.setName(JavaMetadataUtil.getName(unit.getPackage().getName()));
if (!annotations.isEmpty()) {
for (Object object : annotations) {