Class DependencySpec

  • Direct Known Subclasses:
    ModuleDependencySpec

    public abstract class DependencySpec
    extends java.lang.Object
    A dependency specification that represents a single dependency for a module. The dependency can be on a local loader or another module, or on the target module's local loader.
    Author:
    David M. Lloyd, John Bailey, Jason T. Greene
    • Field Detail

      • OWN_DEPENDENCY

        public static final DependencySpec OWN_DEPENDENCY
        A constant dependency which always represents a module's own content.
    • Method Detail

      • getImportFilter

        public PathFilter getImportFilter()
        Get the dependency import filter.
        Returns:
        the import filter
      • getExportFilter

        public PathFilter getExportFilter()
        Get the dependency export filter.
        Returns:
        the export filter
      • getResourceImportFilter

        public PathFilter getResourceImportFilter()
        Get the dependency resource import filter.
        Returns:
        the import filter
      • getResourceExportFilter

        public PathFilter getResourceExportFilter()
        Get the dependency resource export filter.
        Returns:
        the export filter
      • getClassImportFilter

        public ClassFilter getClassImportFilter()
        Get the dependency class import filter.
        Returns:
        the class import filter
      • getClassExportFilter

        public ClassFilter getClassExportFilter()
        Get the dependency class export filter.
        Returns:
        the class export filter
      • createLocalDependencySpec

        public static DependencySpec createLocalDependencySpec()
        Create a dependency on the current module's local resources. You should have at least one such dependency on any module which has its own resources. Always returns OWN_DEPENDENCY.
        Returns:
        the dependency spec
      • createLocalDependencySpec

        @Deprecated
        public static DependencySpec createLocalDependencySpec​(PathFilter importFilter,
                                                               PathFilter exportFilter)
        Deprecated.
        Create a dependency on the current module's local resources. You should have at least one such dependency on any module which has its own resources.
        Parameters:
        importFilter - the import filter to apply
        exportFilter - the export filter to apply
        Returns:
        the dependency spec
      • createLocalDependencySpec

        @Deprecated
        public static DependencySpec createLocalDependencySpec​(PathFilter importFilter,
                                                               PathFilter exportFilter,
                                                               PathFilter resourceImportFilter,
                                                               PathFilter resourceExportFilter,
                                                               ClassFilter classImportFilter,
                                                               ClassFilter classExportFilter)
        Deprecated.
        Create a dependency on the current module's local resources. You should have at least one such dependency on any module which has its own resources.
        Parameters:
        importFilter - the import filter to apply
        exportFilter - the export filter to apply
        resourceImportFilter - the resource import filter to apply
        resourceExportFilter - the resource export filter to apply
        classImportFilter - the class import filter to apply
        classExportFilter - the class export filter to apply
        Returns:
        the dependency spec
      • createSystemDependencySpec

        public static DependencySpec createSystemDependencySpec​(java.util.Set<java.lang.String> loaderPaths)
        Create a system dependency.
        Parameters:
        loaderPaths - the set of paths to use from the system class loader
        Returns:
        the dependency spec
      • createSystemDependencySpec

        public static DependencySpec createSystemDependencySpec​(java.util.Set<java.lang.String> loaderPaths,
                                                                boolean export)
        Create a system dependency.
        Parameters:
        loaderPaths - the set of paths to use from the system class loader
        export - true if this is a fully re-exported dependency, false if it should not be exported
        Returns:
        the dependency spec
      • createSystemDependencySpec

        public static DependencySpec createSystemDependencySpec​(PathFilter importFilter,
                                                                PathFilter exportFilter,
                                                                java.util.Set<java.lang.String> loaderPaths)
        Create a system dependency.
        Parameters:
        importFilter - the import filter to apply
        exportFilter - the export filter to apply
        loaderPaths - the set of paths to use from the system class loader
        Returns:
        the dependency spec
      • createClassLoaderDependencySpec

        @Deprecated
        public static DependencySpec createClassLoaderDependencySpec​(java.lang.ClassLoader classLoader,
                                                                     java.util.Set<java.lang.String> loaderPaths)
        Deprecated.
        Create a dependency on the given class loader.
        Parameters:
        classLoader - the class loader
        loaderPaths - the set of paths to use from this class loader
        Returns:
        the dependency spec
      • createClassLoaderDependencySpec

        @Deprecated
        public static DependencySpec createClassLoaderDependencySpec​(java.lang.ClassLoader classLoader,
                                                                     java.util.Set<java.lang.String> loaderPaths,
                                                                     boolean export)
        Deprecated.
        Create a dependency on the given class loader.
        Parameters:
        classLoader - the class loader
        loaderPaths - the set of paths to use from this class loader
        export - true if this is a fully re-exported dependency, false if it should not be exported
        Returns:
        the dependency spec
      • createClassLoaderDependencySpec

        @Deprecated
        public static DependencySpec createClassLoaderDependencySpec​(PathFilter importFilter,
                                                                     PathFilter exportFilter,
                                                                     java.lang.ClassLoader classLoader,
                                                                     java.util.Set<java.lang.String> loaderPaths)
        Deprecated.
        Create a dependency on the given class loader.
        Parameters:
        importFilter - the import filter to apply
        exportFilter - the export filter to apply
        classLoader - the class loader
        loaderPaths - the set of paths to use from this class loader
        Returns:
        the dependency spec
      • createLocalDependencySpec

        @Deprecated
        public static DependencySpec createLocalDependencySpec​(LocalLoader localLoader,
                                                               java.util.Set<java.lang.String> loaderPaths)
        Deprecated.
        Create a dependency on the given local loader.
        Parameters:
        localLoader - the local loader
        loaderPaths - the set of paths that is exposed by the local loader
        Returns:
        the dependency spec
      • createLocalDependencySpec

        @Deprecated
        public static DependencySpec createLocalDependencySpec​(LocalLoader localLoader,
                                                               java.util.Set<java.lang.String> loaderPaths,
                                                               boolean export)
        Deprecated.
        Create a dependency on the given local loader.
        Parameters:
        localLoader - the local loader
        loaderPaths - the set of paths that is exposed by the local loader
        export - true if this is a fully re-exported dependency, false if it should not be exported
        Returns:
        the dependency spec
      • createLocalDependencySpec

        @Deprecated
        public static DependencySpec createLocalDependencySpec​(PathFilter importFilter,
                                                               PathFilter exportFilter,
                                                               LocalLoader localLoader,
                                                               java.util.Set<java.lang.String> loaderPaths)
        Deprecated.
        Create a dependency on the given local loader.
        Parameters:
        importFilter - the import filter to apply
        exportFilter - the export filter to apply
        localLoader - the local loader
        loaderPaths - the set of paths that is exposed by the local loader
        Returns:
        the dependency spec
      • createLocalDependencySpec

        @Deprecated
        public static DependencySpec createLocalDependencySpec​(PathFilter importFilter,
                                                               PathFilter exportFilter,
                                                               PathFilter resourceImportFilter,
                                                               PathFilter resourceExportFilter,
                                                               ClassFilter classImportFilter,
                                                               ClassFilter classExportFilter,
                                                               LocalLoader localLoader,
                                                               java.util.Set<java.lang.String> loaderPaths)
        Deprecated.
        Create a dependency on the given local loader.
        Parameters:
        importFilter - the import filter to apply
        exportFilter - the export filter to apply
        resourceImportFilter - the resource import filter to apply
        resourceExportFilter - the resource export filter to apply
        classImportFilter - the class import filter to apply
        classExportFilter - the class export filter to apply
        localLoader - the local loader
        loaderPaths - the set of paths that is exposed by the local loader
        Returns:
        the dependency spec
      • createModuleDependencySpec

        @Deprecated
        public static DependencySpec createModuleDependencySpec​(ModuleIdentifier identifier)
        Deprecated.
        Create a dependency on the given module.
        Parameters:
        identifier - the module identifier
        Returns:
        the dependency spec
      • createModuleDependencySpec

        @Deprecated
        public static DependencySpec createModuleDependencySpec​(java.lang.String name)
        Deprecated.
        Create a dependency on the given module.
        Parameters:
        name - the module name
        Returns:
        the dependency spec
      • createModuleDependencySpec

        @Deprecated
        public static DependencySpec createModuleDependencySpec​(ModuleIdentifier identifier,
                                                                boolean export)
        Deprecated.
        Create a dependency on the given module.
        Parameters:
        identifier - the module identifier
        export - true if the dependency should be exported by default
        Returns:
        the dependency spec
      • createModuleDependencySpec

        @Deprecated
        public static DependencySpec createModuleDependencySpec​(java.lang.String name,
                                                                boolean export)
        Deprecated.
        Create a dependency on the given module.
        Parameters:
        name - the module name
        export - true if the dependency should be exported by default
        Returns:
        the dependency spec
      • createModuleDependencySpec

        @Deprecated
        public static DependencySpec createModuleDependencySpec​(ModuleIdentifier identifier,
                                                                boolean export,
                                                                boolean optional)
        Deprecated.
        Create a dependency on the given module.
        Parameters:
        identifier - the module identifier
        export - true if this is a fully re-exported dependency, false if it should not be exported
        optional - true if the dependency is optional, false if it is mandatory
        Returns:
        the dependency spec
      • createModuleDependencySpec

        @Deprecated
        public static DependencySpec createModuleDependencySpec​(java.lang.String name,
                                                                boolean export,
                                                                boolean optional)
        Deprecated.
        Create a dependency on the given module.
        Parameters:
        name - the module name
        export - true if this is a fully re-exported dependency, false if it should not be exported
        optional - true if the dependency is optional, false if it is mandatory
        Returns:
        the dependency spec
      • createModuleDependencySpec

        @Deprecated
        public static DependencySpec createModuleDependencySpec​(ModuleLoader moduleLoader,
                                                                ModuleIdentifier identifier,
                                                                boolean export)
        Deprecated.
        Create a dependency on the given module.
        Parameters:
        moduleLoader - the specific module loader from which the module should be acquired
        identifier - the module identifier
        export - true if this is a fully re-exported dependency, false if it should not be exported
        Returns:
        the dependency spec
      • createModuleDependencySpec

        @Deprecated
        public static DependencySpec createModuleDependencySpec​(ModuleLoader moduleLoader,
                                                                java.lang.String name,
                                                                boolean export)
        Deprecated.
        Create a dependency on the given module.
        Parameters:
        moduleLoader - the specific module loader from which the module should be acquired
        name - the module name
        export - true if this is a fully re-exported dependency, false if it should not be exported
        Returns:
        the dependency spec
      • createModuleDependencySpec

        @Deprecated
        public static DependencySpec createModuleDependencySpec​(ModuleLoader moduleLoader,
                                                                ModuleIdentifier identifier,
                                                                boolean export,
                                                                boolean optional)
        Deprecated.
        Create a dependency on the given module.
        Parameters:
        moduleLoader - the specific module loader from which the module should be acquired
        identifier - the module identifier
        export - true if this is a fully re-exported dependency, false if it should not be exported
        optional - true if the dependency is optional, false if it is mandatory
        Returns:
        the dependency spec
      • createModuleDependencySpec

        @Deprecated
        public static DependencySpec createModuleDependencySpec​(ModuleLoader moduleLoader,
                                                                java.lang.String name,
                                                                boolean export,
                                                                boolean optional)
        Deprecated.
        Create a dependency on the given module.
        Parameters:
        moduleLoader - the specific module loader from which the module should be acquired
        name - the module name
        export - true if this is a fully re-exported dependency, false if it should not be exported
        optional - true if the dependency is optional, false if it is mandatory
        Returns:
        the dependency spec
      • createModuleDependencySpec

        @Deprecated
        public static DependencySpec createModuleDependencySpec​(PathFilter exportFilter,
                                                                ModuleIdentifier identifier,
                                                                boolean optional)
        Deprecated.
        Create a dependency on the given module.
        Parameters:
        exportFilter - the export filter to apply
        identifier - the module identifier
        optional - true if the dependency is optional, false if it is mandatory
        Returns:
        the dependency spec
      • createModuleDependencySpec

        @Deprecated
        public static DependencySpec createModuleDependencySpec​(PathFilter exportFilter,
                                                                java.lang.String name,
                                                                boolean optional)
        Deprecated.
        Create a dependency on the given module.
        Parameters:
        exportFilter - the export filter to apply
        name - the module name
        optional - true if the dependency is optional, false if it is mandatory
        Returns:
        the dependency spec
      • createModuleDependencySpec

        @Deprecated
        public static DependencySpec createModuleDependencySpec​(PathFilter exportFilter,
                                                                ModuleLoader moduleLoader,
                                                                ModuleIdentifier identifier,
                                                                boolean optional)
        Deprecated.
        Create a dependency on the given module.
        Parameters:
        exportFilter - the export filter to apply
        moduleLoader - the specific module loader from which the module should be acquired
        identifier - the module identifier
        optional - true if the dependency is optional, false if it is mandatory
        Returns:
        the dependency spec
      • createModuleDependencySpec

        @Deprecated
        public static DependencySpec createModuleDependencySpec​(PathFilter exportFilter,
                                                                ModuleLoader moduleLoader,
                                                                java.lang.String name,
                                                                boolean optional)
        Deprecated.
        Create a dependency on the given module.
        Parameters:
        exportFilter - the export filter to apply
        moduleLoader - the specific module loader from which the module should be acquired
        name - the module name
        optional - true if the dependency is optional, false if it is mandatory
        Returns:
        the dependency spec
      • createModuleDependencySpec

        @Deprecated
        public static DependencySpec createModuleDependencySpec​(PathFilter importFilter,
                                                                PathFilter exportFilter,
                                                                ModuleLoader moduleLoader,
                                                                ModuleIdentifier identifier,
                                                                boolean optional)
        Deprecated.
        Create a dependency on the given module.
        Parameters:
        importFilter - the import filter to apply
        exportFilter - the export filter to apply
        moduleLoader - the specific module loader from which the module should be acquired
        identifier - the module identifier
        optional - true if the dependency is optional, false if it is mandatory
        Returns:
        the dependency spec
      • createModuleDependencySpec

        @Deprecated
        public static DependencySpec createModuleDependencySpec​(PathFilter importFilter,
                                                                PathFilter exportFilter,
                                                                ModuleLoader moduleLoader,
                                                                java.lang.String name,
                                                                boolean optional)
        Deprecated.
        Create a dependency on the given module.
        Parameters:
        importFilter - the import filter to apply
        exportFilter - the export filter to apply
        moduleLoader - the specific module loader from which the module should be acquired
        name - the module name
        optional - true if the dependency is optional, false if it is mandatory
        Returns:
        the dependency spec
      • createModuleDependencySpec

        @Deprecated
        public static DependencySpec createModuleDependencySpec​(PathFilter importFilter,
                                                                PathFilter exportFilter,
                                                                PathFilter resourceImportFilter,
                                                                PathFilter resourceExportFilter,
                                                                ClassFilter classImportFilter,
                                                                ClassFilter classExportFilter,
                                                                ModuleLoader moduleLoader,
                                                                ModuleIdentifier identifier,
                                                                boolean optional)
        Deprecated.
        Create a dependency on the given module.
        Parameters:
        importFilter - the import filter to apply
        exportFilter - the export filter to apply
        resourceImportFilter - the resource import filter to apply
        resourceExportFilter - the resource export filter to apply
        classImportFilter - the class import filter to apply
        classExportFilter - the class export filter to apply
        moduleLoader - the specific module loader from which the module should be acquired
        identifier - the module identifier
        optional - true if the dependency is optional, false if it is mandatory
        Returns:
        the dependency spec
      • createModuleDependencySpec

        @Deprecated
        public static DependencySpec createModuleDependencySpec​(PathFilter importFilter,
                                                                PathFilter exportFilter,
                                                                PathFilter resourceImportFilter,
                                                                PathFilter resourceExportFilter,
                                                                ClassFilter classImportFilter,
                                                                ClassFilter classExportFilter,
                                                                ModuleLoader moduleLoader,
                                                                java.lang.String name,
                                                                boolean optional)
        Deprecated.
        Create a dependency on the given module.
        Parameters:
        importFilter - the import filter to apply
        exportFilter - the export filter to apply
        resourceImportFilter - the resource import filter to apply
        resourceExportFilter - the resource export filter to apply
        classImportFilter - the class import filter to apply
        classExportFilter - the class export filter to apply
        moduleLoader - the specific module loader from which the module should be acquired
        name - the module name
        optional - true if the dependency is optional, false if it is mandatory
        Returns:
        the dependency spec