docs: @SuppressWarnings( "unchecked" )
      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(JavaMetadataUtil.getName(unit.getPackage().getName()));
              if (!annotations.isEmpty()) {
                  for (Object object : annotations) {
                      packageMetadata.getAnnotations().add(createAnnotationMetadataFor((Annotation)object));
                  }
              }
          }
          return packageMetadata;
      }