Examples of PackageCapability


Examples of org.jboss.classloading.plugins.metadata.PackageCapability

   }
  
   private PackageCapability createPackageCapability(String className, SplitPackagePolicy policy)
   {
      ClassLoadingMetaDataFactory factory = ClassLoadingMetaDataFactory.getInstance();
      PackageCapability capability = (PackageCapability)factory.createPackage(className);
      if (policy != null)
         capability.setSplitPackagePolicy(policy);
     
      return capability;
   }
View Full Code Here

Examples of org.jboss.classloading.plugins.metadata.PackageCapability

      {
         for (Capability capability : capabilities)
         {
            if (capability instanceof PackageCapability)
            {
               PackageCapability exported = (PackageCapability) capability;
               for (String packageName : exported.getPackageNames(this))
               {
                  if (packageName.equals(exportedPackage))
                     return exported;
               }
            }
View Full Code Here

Examples of org.jboss.classloading.plugins.metadata.PackageCapability

      {
         for (Capability capability : capabilities)
         {
            if (capability instanceof PackageCapability)
            {
               PackageCapability exported = (PackageCapability) capability;
               for (String packageName : exported.getPackageNames(this))
               {
                  if (packageName.equals(exportedPackage))
                     return exported;
               }
            }
View Full Code Here

Examples of org.jboss.classloading.plugins.metadata.PackageCapability

      {
         for (Capability capability : capabilities)
         {
            if (capability instanceof PackageCapability)
            {
               PackageCapability exported = (PackageCapability) capability;
               for (String packageName : exported.getPackageNames(this))
               {
                  if (packageName.equals(exportedPackage))
                     return exported;
               }
            }
View Full Code Here

Examples of org.jboss.classloading.plugins.metadata.PackageCapability

         for (String exportedPackage : exportedPackages)
         {
            Module otherModule = modulesByPackage.get(exportedPackage);
            if (otherModule != null)
            {
               PackageCapability exportCapability = module.getExportCapability(exportedPackage);
               if (exportCapability.getSplitPackagePolicy() == SplitPackagePolicy.Error)
               {
                  // TODO JBCL-22 ERRORS
                  throw new IllegalStateException(module + " cannot be added because it is exports package " + exportedPackage + " which conflicts with " + otherModule);
               }
            }
         }
      }

      // Check our requirements are consistent with the other requirements
      List<RequirementDependencyItem> moduleDependencies = module.getDependencies();
      if (requirements.isEmpty() == false)
      {
         if (moduleDependencies != null && moduleDependencies.isEmpty() == false)
         {
            for (RequirementDependencyItem dependency : moduleDependencies)
            {
               Requirement requirement = dependency.getRequirement();
               for (Entry<Module, List<RequirementDependencyItem>> entry : requirements.entrySet())
               {
                  Module otherModule = entry.getKey();
                  List<RequirementDependencyItem> dependencies = entry.getValue();
                  for (RequirementDependencyItem otherDependency : dependencies)
                  {
                     Requirement otherRequirement = otherDependency.getRequirement();
                     // TODO JBCL-22 ERRORS
                     if (requirement.isConsistent(otherRequirement) == false)
                        throw new IllegalStateException(module + " has a requirement " + requirement + " which is inconsistent with " + otherRequirement + " from " + otherModule);
                  }
               }
            }
         }
      }
     
      // Update the exported packages
      if (exportedPackages != null && exportedPackages.isEmpty() == false)
      {
         for (String exportedPackage : exportedPackages)
         {
            Module firstModule = modulesByPackage.get(exportedPackage);
            PackageCapability exportCapability = module.getExportCapability(exportedPackage);
            if (firstModule == null || exportCapability.getSplitPackagePolicy() == SplitPackagePolicy.Last)
               modulesByPackage.put(exportedPackage, module);
         }
      }
     
      // Remember the module requirements
View Full Code Here

Examples of org.jboss.classloading.plugins.metadata.PackageCapability

      {
         for (Capability capability : capabilities)
         {
            if (capability instanceof PackageCapability)
            {
               PackageCapability exported = (PackageCapability) capability;
               for (String packageName : exported.getPackageNames(this))
               {
                  if (packageName.equals(exportedPackage))
                     return exported;
               }
            }
View Full Code Here

Examples of org.jboss.classloading.plugins.metadata.PackageCapability

      {
         for (Capability capability : capabilities)
         {
            if (capability instanceof PackageCapability)
            {
               PackageCapability exported = (PackageCapability) capability;
               for (String packageName : exported.getPackageNames(this))
               {
                  if (packageName.equals(exportedPackage))
                     return exported;
               }
            }
View Full Code Here

Examples of org.jboss.classloading.plugins.metadata.PackageCapability

         for (String exportedPackage : exportedPackages)
         {
            Module otherModule = modulesByPackage.get(exportedPackage);
            if (otherModule != null)
            {
               PackageCapability exportCapability = module.getExportCapability(exportedPackage);
               if (exportCapability.getSplitPackagePolicy() == SplitPackagePolicy.Error)
               {
                  // TODO JBCL-22 ERRORS
                  throw new IllegalStateException(module + " cannot be added because it is exports package " + exportedPackage + " which conflicts with " + otherModule);
               }
            }
         }
      }

      // Check our requirements are consistent with the other requirements
      List<RequirementDependencyItem> moduleDependencies = module.getDependencies();
      if (requirements.isEmpty() == false)
      {
         if (moduleDependencies != null && moduleDependencies.isEmpty() == false)
         {
            for (RequirementDependencyItem dependency : moduleDependencies)
            {
               Requirement requirement = dependency.getRequirement();
               for (Entry<Module, List<RequirementDependencyItem>> entry : requirements.entrySet())
               {
                  Module otherModule = entry.getKey();
                  List<RequirementDependencyItem> dependencies = entry.getValue();
                  for (RequirementDependencyItem otherDependency : dependencies)
                  {
                     Requirement otherRequirement = otherDependency.getRequirement();
                     // TODO JBCL-22 ERRORS
                     if (requirement.isConsistent(otherRequirement) == false)
                        throw new IllegalStateException(module + " has a requirement " + requirement + " which is inconsistent with " + otherRequirement + " from " + otherModule);
                  }
               }
            }
         }
      }
     
      // Update the exported packages
      if (exportedPackages != null && exportedPackages.isEmpty() == false)
      {
         for (String exportedPackage : exportedPackages)
         {
            Module firstModule = modulesByPackage.get(exportedPackage);
            PackageCapability exportCapability = module.getExportCapability(exportedPackage);
            if (firstModule == null || exportCapability.getSplitPackagePolicy() == SplitPackagePolicy.Last)
               modulesByPackage.put(exportedPackage, module);
         }
      }
     
      // Remember the module requirements
View Full Code Here

Examples of org.jboss.deployers.structure.spi.classloading.PackageCapability

   {
      if (obj == this)
         return true;
      if (obj == null || obj instanceof PackageCapability == false)
         return false;
      PackageCapability other = (PackageCapability) obj;
      if (getName().equals(other.getName()) == false)
         return false;
      return getVersion().equals(other.getVersion());
   }
View Full Code Here

Examples of org.jboss.deployers.structure.spi.classloading.PackageCapability

/*     */   {
/*  99 */     if (obj == this)
/* 100 */       return true;
/* 101 */     if ((obj == null) || (!(obj instanceof PackageCapability)))
/* 102 */       return false;
/* 103 */     PackageCapability other = (PackageCapability)obj;
/* 104 */     if (!getName().equals(other.getName()))
/* 105 */       return false;
/* 106 */     return getVersion().equals(other.getVersion());
/*     */   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.