Examples of createRequireModule()


Examples of org.jboss.classloading.spi.metadata.ClassLoadingMetaDataFactory.createRequireModule()

      AbstractRequirement integrationModule = hasIntegrationModuleRequirement(requirements);
      // If we are importing integration core then import the jboss integration at the same version
      if (integrationModule != null)
      {
         ClassLoadingMetaDataFactory factory = ClassLoadingMetaDataFactory.getInstance();
         Requirement integrationRequirement = factory.createRequireModule(integrationModuleName, integrationModule.getVersionRange());
         requirements.addRequirement(integrationRequirement);
      }
   }

   /**
 
View Full Code Here

Examples of org.jboss.classloading.spi.metadata.ClassLoadingMetaDataFactory.createRequireModule()

  
   public void testRequirements() throws Exception
   {
      ClassLoadingMetaDataFactory factory = ClassLoadingMetaDataFactory.getInstance();
      VFSClassLoaderFactory test = new VFSClassLoaderFactory();
      test.getRequirements().addRequirement(factory.createRequireModule("module"));
      test.getRequirements().addRequirement(factory.createRequirePackage("package"));
      ManagedObject mo = assertManagedObject(test);
      assertManagedProperty(mo, "requirements", RequirementsMetaData.class, test.getRequirements());
   }
}
View Full Code Here

Examples of org.jboss.classloading.spi.metadata.ClassLoadingMetaDataFactory.createRequireModule()

      ClassLoadingMetaDataFactory factory = ClassLoadingMetaDataFactory.getInstance();
     
      ClassLoadingMetaData test = new ClassLoadingMetaData();
      RequirementsMetaData requirementsMetaData = test.getRequirements();
      assertNull(requirementsMetaData.getRequirements());
      Requirement requirement = factory.createRequireModule("test");
      requirementsMetaData.addRequirement(requirement);
      assertEquals(Collections.singletonList(requirement), requirementsMetaData.getRequirements());

      ClassLoadingMetaData test2 = new ClassLoadingMetaData();
      testEquals(test, test2, false);
View Full Code Here

Examples of org.jboss.classloading.spi.metadata.ClassLoadingMetaDataFactory.createRequireModule()

      test.setExportAll(ExportAll.ALL);
      test.setImportAll(true);
      test.setJ2seClassLoadingCompliance(false);
      test.getCapabilities().addCapability(factory.createModule("module", "1.0.0"));
      test.getCapabilities().addCapability(factory.createPackage("package", "1.0.0"));
      test.getRequirements().addRequirement(factory.createRequireModule("module", new VersionRange("1.0.0", "2.0.0")));
      test.getRequirements().addRequirement(factory.createRequireModule("package", new VersionRange("1.0.0", "2.0.0")));
      ClassLoadingMetaData other = serializeDeserialize(test, ClassLoadingMetaData.class);
      assertEquals(test, other);
   }
  
View Full Code Here

Examples of org.jboss.classloading.spi.metadata.ClassLoadingMetaDataFactory.createRequireModule()

      test.setImportAll(true);
      test.setJ2seClassLoadingCompliance(false);
      test.getCapabilities().addCapability(factory.createModule("module", "1.0.0"));
      test.getCapabilities().addCapability(factory.createPackage("package", "1.0.0"));
      test.getRequirements().addRequirement(factory.createRequireModule("module", new VersionRange("1.0.0", "2.0.0")));
      test.getRequirements().addRequirement(factory.createRequireModule("package", new VersionRange("1.0.0", "2.0.0")));
      ClassLoadingMetaData other = serializeDeserialize(test, ClassLoadingMetaData.class);
      assertEquals(test, other);
   }
  
   protected void testEquals(ClassLoadingMetaData test1, ClassLoadingMetaData test2, boolean result)
View Full Code Here

Examples of org.jboss.classloading.spi.metadata.ClassLoadingMetaDataFactory.createRequireModule()

         ClassLoader clA = assertClassLoader(contextA);
         assertLoadClass(A.class, clA);
         assertLoadClassFail(B.class, clA);

         MockClassLoadingMetaData b = new MockClassLoadingMetaData("b");
         b.getRequirements().addRequirement(factory.createRequireModule("ModuleA"));
         b.setPathsAndPackageNames(B.class);
         KernelControllerContext contextB = install(b);
         try
         {
            assertLoadClass(A.class, clA);
View Full Code Here

Examples of org.jboss.classloading.spi.metadata.ClassLoadingMetaDataFactory.createRequireModule()

         ClassLoader clA = assertClassLoader(contextA);
         assertLoadClass(A.class, clA);
         assertLoadClassFail(B.class, clA);

         MockClassLoadingMetaData b = new MockClassLoadingMetaData("b");
         b.getRequirements().addRequirement(factory.createRequireModule("ModuleA", new VersionRange("1.0.0", "2.0.0")));
         b.setPathsAndPackageNames(B.class);
         KernelControllerContext contextB = install(b);
         try
         {
            assertLoadClass(A.class, clA);
View Full Code Here

Examples of org.jboss.classloading.spi.metadata.ClassLoadingMetaDataFactory.createRequireModule()

         ClassLoader clA = assertClassLoader(contextA);
         assertLoadClass(A.class, clA);
         assertLoadClassFail(B.class, clA);

         MockClassLoadingMetaData b = new MockClassLoadingMetaData("b");
         b.getRequirements().addRequirement(factory.createRequireModule("ModuleA", new VersionRange("1.0.0", "2.0.0")));
         b.setPathsAndPackageNames(B.class);
         KernelControllerContext contextB = install(b);
         try
         {
            assertLoadClass(A.class, clA);
View Full Code Here

Examples of org.jboss.classloading.spi.metadata.ClassLoadingMetaDataFactory.createRequireModule()

   public void testImportOneModuleNoVersion() throws Exception
   {
      VFSClassLoaderFactory result = unmarshal();
      ClassLoadingMetaDataFactory factory = ClassLoadingMetaDataFactory.getInstance();
      assertRequirements(result, factory.createRequireModule("export1"));
   }

   public void testImportOneModuleVersioned() throws Exception
   {
      VFSClassLoaderFactory result = unmarshal();
View Full Code Here

Examples of org.jboss.classloading.spi.metadata.ClassLoadingMetaDataFactory.createRequireModule()

   public void testImportOneModuleVersioned() throws Exception
   {
      VFSClassLoaderFactory result = unmarshal();
      ClassLoadingMetaDataFactory factory = ClassLoadingMetaDataFactory.getInstance();
      assertRequirements(result, factory.createRequireModule("export1", new VersionRange("1.0.0", "2.0.0")));
   }

   public void testImportThreeModules() throws Exception
   {
      VFSClassLoaderFactory result = unmarshal();
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.