All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hibernate.boot.archive.internal.StandardArchiveDescriptorFactory Maven / Gradle / Ivy

Go to download

JPMS Module-Info's for a few of the Jakarta Libraries just until they add them in themselves

There is a newer version: 62
Show newest version
package org.hibernate.boot.archive.internal;


import org.hibernate.boot.archive.spi.ArchiveDescriptor;
import org.hibernate.boot.archive.spi.ArchiveDescriptorFactory;
import org.jboss.logging.Logger;

import java.net.URL;

/**
 * Standard implementation of ArchiveDescriptorFactory
 *
 * @author Emmanuel Bernard
 * @author Steve Ebersole
 */
public class StandardArchiveDescriptorFactory implements ArchiveDescriptorFactory {
    private static final Logger log = Logger.getLogger( StandardArchiveDescriptorFactory.class );

    /**
     * Singleton access
     */
    public static final StandardArchiveDescriptorFactory INSTANCE = new StandardArchiveDescriptorFactory();

    @Override
    public ArchiveDescriptor buildArchiveDescriptor(URL url) {
        return buildArchiveDescriptor( url, "" );
    }

    @Override
    public ArchiveDescriptor buildArchiveDescriptor(URL url, String entry) {

        ArchiveDescriptor returnable = null;
        returnable = new ClassInfoArchiveDescriptor(this,url,entry);
        return returnable;
    }

    @Override
    public URL getJarURLFromURLEntry(URL url, String entry) throws IllegalArgumentException {
        return ArchiveHelper.getJarURLFromURLEntry( url, entry );
    }

    @Override
    public URL getURLFromPath(String jarPath) {
        return ArchiveHelper.getURLFromPath( jarPath );
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy