Package org.jboss.classloading.spi.metadata

Examples of org.jboss.classloading.spi.metadata.ClassLoadingMetaDataFactory


   }

   public void testOptionalRequirement() throws Exception
   {
      ClassLoadingMetaData result = unmarshal(TestRequirement.class);
      ClassLoadingMetaDataFactory factory = ClassLoadingMetaDataFactory.getInstance();
      assertRequirements(result, factory.createRequireModule("test1", new VersionRange("1.0.0"), true, false, false),
                                 factory.createRequirePackage("test1", new VersionRange("1.0.0"), true, false, false));
   }
View Full Code Here


   }

   public void testDynamicRequirement() throws Exception
   {
      ClassLoadingMetaData result = unmarshal(TestRequirement.class);
      ClassLoadingMetaDataFactory factory = ClassLoadingMetaDataFactory.getInstance();
      assertRequirements(result, factory.createRequireModule("test1", new VersionRange("1.0.0"), false, false, true),
                                 factory.createRequirePackage("test1", new VersionRange("1.0.0"), false, false, true));
   }
View Full Code Here

   }

   public void testReExportRequirement() throws Exception
   {
      ClassLoadingMetaData result = unmarshal(TestRequirement.class);
      ClassLoadingMetaDataFactory factory = ClassLoadingMetaDataFactory.getInstance();
      assertRequirements(result, factory.createReExportModule("test1", new VersionRange("1.0.0")),
                                 factory.createReExportPackage("test1", new VersionRange("1.0.0")));
   }
View Full Code Here

   }

   public void testUsesRequirement() throws Exception
   {
      ClassLoadingMetaData result = unmarshal(TestRequirement.class);
      ClassLoadingMetaDataFactory factory = ClassLoadingMetaDataFactory.getInstance();
      assertRequirements(result, factory.createUsesPackage("test1", new VersionRange("1.0.0")));
   }
View Full Code Here

      List<Capability> capabilities = super.determineCapabilities();
      if (capabilities != null)
         return capabilities;
        
      // We need to work it out
      ClassLoadingMetaDataFactory factory = ClassLoadingMetaDataFactory.getInstance();
      capabilities = new CopyOnWriteArrayList<Capability>();

      // We have a module capability
      Object version = getVersion();
      Capability capability = factory.createModule(getName(), version);
      capabilities.add(capability);
     
      // Do we determine package capabilities
      ClassFilter included = getIncluded();
      ClassFilter excluded = getExcluded();
      ClassFilter excludedExport = getExcludedExport();
      ExportAll exportAll = getExportAll();
      if (exportAll != null)
      {
         Set<String> exportedPackages = PackageVisitor.determineAllPackages(roots, null, exportAll, included, excluded, excludedExport);
         for (String packageName : exportedPackages)
         {
            capability = factory.createPackage(packageName, version);
            capabilities.add(capability);
         }
      }
     
      return capabilities;
View Full Code Here

         // Do we have to export all packages? Not going to know them...
         int lastDot = clientClass.lastIndexOf('.');
         if(lastDot > 0)
         {
            String clientPackage = clientClass.substring(0, lastDot);
            ClassLoadingMetaDataFactory cfactory = ClassLoadingMetaDataFactory.getInstance();
            factory.getCapabilities().addCapability(cfactory.createModule(clientPackage));
            factory.getCapabilities().addCapability(cfactory.createPackage(clientPackage));
         }
         //factory.setIncluded(ClassFilter.JAVA_ONLY);

         ArrayList<BeanMetaDataFactory> beanFactories = new ArrayList<BeanMetaDataFactory>();
         beanFactories.add(factory);
View Full Code Here

   }

   public void testWildcardRequirement() throws Exception
   {
      VFSClassLoaderFactory result = unmarshal(TestRequirement.class);
      ClassLoadingMetaDataFactory factory = ClassLoadingMetaDataFactory.getInstance();
      assertRequirements(result, factory.createRequireModule("test1", new VersionRange("1.0.0")),
                                 factory.createRequirePackage("test1", new VersionRange("1.0.0")),
                                 new TestRequirement("test", new VersionRange("1.0.0")));
   }
View Full Code Here

      super(name);
   }
  
   public void testCreateModuleNoVersion() throws Exception
   {
      ClassLoadingMetaDataFactory factory = ClassLoadingMetaDataFactory.getInstance();
      Capability test = factory.createModule("test");
      assertEquals(new ModuleCapability("test"), test);
   }
View Full Code Here

      assertEquals(new ModuleCapability("test"), test);
   }
  
   public void testCreateModuleVersioned() throws Exception
   {
      ClassLoadingMetaDataFactory factory = ClassLoadingMetaDataFactory.getInstance();
      Capability test = factory.createModule("test", "1.0.0");
      assertEquals(new ModuleCapability("test", "1.0.0"), test);
   }
View Full Code Here

   }

   public void testOptionalRequirement() throws Exception
   {
      VFSClassLoaderFactory result = unmarshal(TestRequirement.class);
      ClassLoadingMetaDataFactory factory = ClassLoadingMetaDataFactory.getInstance();
      assertRequirements(result, factory.createRequireModule("test1", new VersionRange("1.0.0"), true, false, false),
                                 factory.createRequirePackage("test1", new VersionRange("1.0.0"), true, false, false));
   }
View Full Code Here

TOP

Related Classes of org.jboss.classloading.spi.metadata.ClassLoadingMetaDataFactory

Copyright © 2018 www.massapicom. 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.