Package org.jboss.classloading.spi.metadata

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


      RequirementsMetaData metadata = new RequirementsMetaData();
      assertNull(metadata.getRequirements());
     
      List<Requirement> list = new ArrayList<Requirement>();
      list.add(factory.createRequireModule("module", new VersionRange("1.0.0")));
      list.add(factory.createRequirePackage("package", new VersionRange("1.0.0")));
      metadata.setRequirements(list);
     
      assertEquals(list, metadata.getRequirements());
   }
View Full Code Here


      RequirementsMetaData metadata = new RequirementsMetaData();
      assertNull(metadata.getRequirements());
     
      List<Requirement> list = new ArrayList<Requirement>();
      Requirement Requirement = factory.createRequireModule("module", new VersionRange("1.0.0"));
      metadata.addRequirement(Requirement);
      list.add(Requirement);
      assertEquals(list, metadata.getRequirements());

      Requirement = factory.createRequirePackage("module", new VersionRange("1.0.0"));
View Full Code Here

      ClassLoadingMetaDataFactory factory = ClassLoadingMetaDataFactory.getInstance();

      RequirementsMetaData metadata = new RequirementsMetaData();
      assertNull(metadata.getRequirements());

      Requirement module = factory.createRequireModule("module", new VersionRange("1.0.0"));
      Requirement pkge = factory.createRequirePackage("module", new VersionRange("1.0.0"));

      List<Requirement> list = new ArrayList<Requirement>();
      list.add(module);
      list.add(pkge);
View Full Code Here

   public void testSerialization() throws Exception
   {
      ClassLoadingMetaDataFactory factory = ClassLoadingMetaDataFactory.getInstance();

      RequirementsMetaData test = new RequirementsMetaData();
      test.addRequirement(factory.createRequireModule("module", new VersionRange("1.0.0")));
      test.addRequirement(factory.createRequirePackage("package", new VersionRange("1.0.0")));
      RequirementsMetaData other = serializeDeserialize(test, RequirementsMetaData.class);
      assertEquals(test.getRequirements(), other.getRequirements());
   }
}
View Full Code Here

            assertLoadClassFail(C.class, clB);

            VFSClassLoaderFactory c = new VFSClassLoaderFactory("c");
            c.getRoots().add(getRoot(C.class));
            c.setIncludedPackages(C.class.getPackage().getName());
            c.getRequirements().addRequirement(factory.createRequireModule("b"));
            KernelDeployment depC = install(c);
            try
            {
               assertLoadClass(A.class, clA);
               assertLoadClassFail(B.class, clA);
View Full Code Here

         ClassLoader clA1 = assertClassLoader(contextA1);
         assertLoadClass(A.class, clA1);
         assertLoadClassFail(B.class, clA1);

         MockClassLoadingMetaData a2 = new MockClassLoadingMetaData("a2", "2.0.0");
         a2.getRequirements().addRequirement(factory.createRequireModule("a1"));
         a2.setPathsAndPackageNames(A.class);
         KernelControllerContext contextA2 = install(a2);
         try
         {
            assertNoClassLoader(contextA2);
View Full Code Here

         ClassLoader clA1 = assertClassLoader(contextA1);
         assertLoadClass(A.class, clA1);
         assertLoadClassFail(B.class, clA1);

         MockClassLoadingMetaData a2 = new MockClassLoadingMetaData("a2", "2.0.0");
         a2.getRequirements().addRequirement(factory.createRequireModule("a1"));
         a2.setPathsAndPackageNames(A.class);
         KernelControllerContext contextA2 = install(a2);
         try
         {
            ClassLoader clA2 = assertClassLoader(contextA2);
View Full Code Here

  
   public void testConflictingPackageRedeploy() throws Exception
   {
      ClassLoadingMetaDataFactory factory = ClassLoadingMetaDataFactory.getInstance();
      MockClassLoadingMetaData a1 = new MockClassLoadingMetaData("a1", "1.0.0");
      a1.getRequirements().addRequirement(factory.createRequireModule("a2"));
      a1.setPathsAndPackageNames(A.class);
      KernelControllerContext contextA1 = install(a1);
      try
      {
         assertNoClassLoader(contextA1);
View Full Code Here

            assertLoadClassFail(B.class, clA2);
           
            uninstall(contextA1);

            a1 = new MockClassLoadingMetaData("a1", "1.0.0");
            a1.getRequirements().addRequirement(factory.createRequireModule("a2"));
            a1.setPathsAndPackageNames(B.class);
            contextA1 = install(a1);

            ClassLoader clA1 = assertClassLoader(contextA1);
            assertLoadClass(A.class, clA2);
View Full Code Here

            assertLoadClass(A.class, clB, clA);
            assertLoadClass(B.class, clB);
            assertLoadClassFail(C.class, clB);

            MockClassLoadingMetaData c = new MockClassLoadingMetaData("c");
            c.getRequirements().addRequirement(factory.createRequireModule("b"));
            c.setPathsAndPackageNames(C.class);
            KernelControllerContext contextC = install(c);
            try
            {
               assertLoadClass(A.class, clA);
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.