Package org.jboss.classloading.spi.metadata

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


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

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


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

         MockClassLoadingMetaData b = new MockClassLoadingMetaData("b");
         b.getRequirements().addRequirement(factory.createRequirePackage(A.class.getPackage().getName(), 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

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

         MockClassLoadingMetaData b = new MockClassLoadingMetaData("b");
         b.getRequirements().addRequirement(factory.createRequirePackage(A.class.getPackage().getName(), 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

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

         VFSClassLoaderFactory b = new VFSClassLoaderFactory("b");
         b.getRequirements().addRequirement(factory.createRequirePackage(A.class.getPackage().getName()));
         b.getRoots().add(getRoot(B.class));
         b.setIncludedPackages(B.class.getPackage().getName());
         KernelDeployment depB = install(b);
         try
         {
View Full Code Here

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

         VFSClassLoaderFactory b = new VFSClassLoaderFactory("b");
         b.getRequirements().addRequirement(factory.createRequirePackage(A.class.getPackage().getName(), new VersionRange("1.0.0", "2.0.0")));
         b.getRoots().add(getRoot(B.class));
         b.setIncludedPackages(B.class.getPackage().getName());
         KernelDeployment depB = install(b);
         try
         {
View Full Code Here

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

         VFSClassLoaderFactory b = new VFSClassLoaderFactory("b");
         b.getRequirements().addRequirement(factory.createRequirePackage(A.class.getPackage().getName(), new VersionRange("1.0.0", "2.0.0")));
         b.getRoots().add(getRoot(B.class));
         b.setIncludedPackages(B.class.getPackage().getName());
         KernelDeployment depB = install(b);
         try
         {
View Full Code Here

   public void testRequirements() throws Exception
   {
      ClassLoadingMetaDataFactory factory = ClassLoadingMetaDataFactory.getInstance();
      ClassLoadingMetaData test = new ClassLoadingMetaData();
      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

   public void testRequirements() throws Exception
   {
      ClassLoadingMetaDataFactory factory = ClassLoadingMetaDataFactory.getInstance();
      ClassLoadingMetaData test = new ClassLoadingMetaData();
      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

   public void testImportOnePackageNoVersion() throws Exception
   {
      ClassLoadingMetaData result = unmarshal();
      ClassLoadingMetaDataFactory factory = ClassLoadingMetaDataFactory.getInstance();
      assertRequirements(result, factory.createRequirePackage("export1"));
   }

   public void testImportOnePackageVersioned() throws Exception
   {
      ClassLoadingMetaData result = unmarshal();
View Full Code Here

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

   public void testImportThreePackages() throws Exception
   {
      ClassLoadingMetaData 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.