private Package definePackageFromManifest(final String packageName, final Manifest manifest, final URL codeSourceUrl)
            throws IllegalArgumentException {
        // https://docs.oracle.com/javase/8/docs/technotes/guides/jar/jar.html#Per-Entry_Attributes
        final Optional<Attributes> perEntryAttributes =
                Optional.ofNullable(manifest.getAttributes(packageName.replace('.', '/').concat("/")));
        final Attributes mainAttributes = manifest.getMainAttributes();

        return this.definePackage(
                packageName,
                getEffectiveAttribute(mainAttributes, perEntryAttributes, Attributes.Name.SPECIFICATION_TITLE),
                getEffectiveAttribute(mainAttributes, perEntryAttributes, Attributes.Name.SPECIFICATION_VERSION),
                getEffectiveAttribute(mainAttributes, perEntryAttributes, Attributes.Name.SPECIFICATION_VENDOR),
                getEffectiveAttribute(mainAttributes, perEntryAttributes, Attributes.Name.IMPLEMENTATION_TITLE),
                getEffectiveAttribute(mainAttributes, perEntryAttributes, Attributes.Name.IMPLEMENTATION_VERSION),
                getEffectiveAttribute(mainAttributes, perEntryAttributes, Attributes.Name.IMPLEMENTATION_VENDOR),
                "true".equalsIgnoreCase(
                        getEffectiveAttribute(mainAttributes, perEntryAttributes, Attributes.Name.SEALED))
                        ? codeSourceUrl
                        : null);
    }
Finds resources recognized as the given name.

<p>Note that {@link java.net.URLClassLoader#findResources} is public while {@link java.lang.ClassLoader#findResources}
is protected.
embulk-core/src/main/java/org/embulk/cli/SelfContainedJarAwareURLClassLoader.java