Uploaded image for project: 'ShrinkWrap'
  1. ShrinkWrap
  2. SHRINKWRAP-229

Should be able to add Packages based on String name

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • 1.0.0-alpha-12
    • None
    • api, impl-base
    • None

      Problem:

      Adding all classes to a parent package that does not contain a class is not possible. The Parent Package is never created by the jvm etc. You have to manually add all sub packages instead.

      Adding classes from a package where no Classes have been loaded from yet is not possible, jvm lazy creates the packages.
      e.g. Pakcage.getPackage("my.package") does not exist until a class in "my.package" has been loaded. Workaround is to force load a class e.g. my.package.MyClass.class.getPackage()

      Solution:
      Add method to ClassContainer API

      • addPackage(String packageName)
      • addPackages(boolean recursive, String... packageNames)
      • addPackages(boolean recursive, Filter<ArchivePath> filter, String... packageNames)

            aslak@redhat.com Aslak Knutsen
            aslak@redhat.com Aslak Knutsen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: