Package org.jboss.test.aop.classpool.jbosscl.support

Examples of org.jboss.test.aop.classpool.jbosscl.support.BundleInfoBuilder


   {
      ClassPool clA = null;
      Result rA = new Result();
      try
      {
         BundleInfoBuilder builderA = BundleInfoBuilder.getBuilder().
            createModule("ModuleA").
            createPackage(PACKAGE_A, "3.0.0");
         clA = createClassPool(rA, "A", builderA, JAR_A_1);
         CtClass classA = assertLoadCtClass(CLASS_A, clA);
         assertCannotLoadCtClass(clA, CLASS_B);
        
         Result rB = new Result();
         try
         {
            BundleInfoBuilder builderB = BundleInfoBuilder.getBuilder().
               createPackage(PACKAGE_B).
               createRequirePackage(PACKAGE_A, new VersionRange("1.0.0", "2.0.0"));
            try
            {
               createClassPool(rB, "B", builderB, JAR_B_1);
View Full Code Here


      Result rA1 = new Result();
      Result rA2 = new Result();
      Result rA3 = new Result();
      try
      {
         BundleInfoBuilder builderA1 = BundleInfoBuilder.getBuilder().
            createModule("PackageA").
            createPackage(PACKAGE_A, "1.0.0");
         clA1 = createClassPool(rA1, "A1", builderA1, JAR_A_1);
        
         BundleInfoBuilder builderA2 = BundleInfoBuilder.getBuilder().
            createModule("PackageA").
            createPackage(PACKAGE_A, "2.0.0");
         clA2 = createClassPool(rA2, "A2", builderA2, JAR_A_1);
        
         BundleInfoBuilder builderA3 = BundleInfoBuilder.getBuilder().
         createModule("PackageA").
         createPackage(PACKAGE_A, "3.0.0");
         clA3 = createClassPool(rA3, "A3", builderA3, JAR_A_1);
                 
         CtClass classA1 = assertLoadCtClass(CLASS_A, clA1);
         CtClass classA2 = assertLoadCtClass(CLASS_A, clA2);
         CtClass classA3 = assertLoadCtClass(CLASS_A, clA3);
         assertCannotLoadCtClass(clA1, CLASS_B);
         assertCannotLoadCtClass(clA2, CLASS_B);
         assertCannotLoadCtClass(clA3, CLASS_B);
        
         ClassPool clB = null;
         Result rB = new Result();
         try
         {
            BundleInfoBuilder builderB = BundleInfoBuilder.getBuilder().
               createPackage(PACKAGE_B).
               createRequirePackage(PACKAGE_A, new VersionRange("1.0.0", false, "2.0.0", true));
            clB = createClassPool(rB, "B", builderB, JAR_B_1);
            CtClass classA11 = assertLoadCtClass(CLASS_A, clA1);
            assertSame(classA1, classA11);
View Full Code Here

   {
      ClassLoader clA1 = null;
      Result rA1 = new Result();
      try
      {
         BundleInfoBuilder builderA1 = BundleInfoBuilder.getBuilder().
            createModule("a1").
            createPackage(PACKAGE_A);
         clA1 = createClassLoader(rA1, "A1", builderA1, JAR_A_1);
         Class<?> classA = assertLoadClass(CLASS_A, clA1);

         ClassLoader clA2 = null;
         Result rA2 = new Result();
         try
         {
            BundleInfoBuilder builderA2 = BundleInfoBuilder.getBuilder().
            createModule("a2").
            createUsesPackage(PACKAGE_A);

            clA2 = createClassLoader(rA2, "A2", builderA2, JAR_A_1);
            Class<?> classA1 = assertLoadClass(CLASS_A, clA1);
View Full Code Here

   {
      ClassLoader clA1 = null;
      Result rA1 = new Result();
      try
      {
         BundleInfoBuilder builderA1 = BundleInfoBuilder.getBuilder().
            createModule("a1").
            createUsesPackage(PACKAGE_A);
         clA1 = createClassLoader(rA1, "A1", builderA1, JAR_A_1);
         assertLoadClass(CLASS_A, clA1);
      }
View Full Code Here

   {
      ClassPool globalPoolA = null;
      ClassPool globalPoolB = null;
      try
      {
         BundleInfoBuilder builderA = BundleInfoBuilder.getBuilder().
         createModule("ModuleA").
         createPackage(PACKAGE_A).
         createPackage(ContainerProxyFactory.PROXY_CLASSES_DEFAULT_PACKAGE);        
         globalPoolA = createClassPool("A", true, builderA, JAR_A_1);
        
         BundleInfoBuilder builderB = BundleInfoBuilder.getBuilder().
         createModule("ModuleB").
         createPackage(PACKAGE_B).
         createPackage(ContainerProxyFactory.PROXY_CLASSES_DEFAULT_PACKAGE);
         globalPoolB = createClassPool("B", true, builderB, JAR_B_1);
        
View Full Code Here

   {
      ClassLoader clA = null;
      Result resultA = new Result();
      try
      {
         BundleInfoBuilder builderA = BundleInfoBuilder.getBuilder().
            createModule("ModuleA").
            createPackage(PACKAGE_A);
         clA = createClassLoader(resultA, "A", builderA, JAR_A_1);
        
         Class<?> aFromA = assertLoadClass(CLASS_A, clA, clA);
         assertCannotLoadClass(clA, CLASS_B);
        
         ClassLoader clB = null;
         Result resultB = new Result();
         try
         {
            BundleInfoBuilder builderB = BundleInfoBuilder.getBuilder().
               createModule("ModuleB").
               createRequireModule("ModuleA");
            clB = createClassLoader(resultB, "B", builderB, JAR_B_1);

            Class<?> aFromA1 = assertLoadClass(CLASS_A, clA, clA);
View Full Code Here

   {
      ClassLoader clA = null;
      Result resultA = new Result();
      try
      {
         BundleInfoBuilder builderA = BundleInfoBuilder.getBuilder().
            createModule("ModuleA", "1.0.0").
            createPackage(PACKAGE_A);
         clA = createClassLoader(resultA, "A", builderA, JAR_A_1);
         Class<?> classA = assertLoadClass(CLASS_A, clA);
         assertCannotLoadClass(clA, CLASS_B);

         ClassLoader clB = null;
         Result resultB = new Result();
         try
         {
            BundleInfoBuilder builderB = BundleInfoBuilder.getBuilder().
               createRequireModule("ModuleA", new VersionRange("1.0.0", "2.0.0")).
               createPackage(PACKAGE_B);
            clB = createClassLoader(resultB, "B", builderB, JAR_B_1);
            Class<?> classA1 = assertLoadClass(CLASS_A, clA);
            assertSame(classA, classA1);
View Full Code Here

   {
      ClassLoader clA = null;
      Result resultA = new Result();
      try
      {
         BundleInfoBuilder builderA = BundleInfoBuilder.getBuilder().
            createModule("ModuleA", "3.0.0").
            createPackage(PACKAGE_A);
         clA = createClassLoader(resultA, "A", builderA, JAR_A_1);
         Class<?> classA = assertLoadClass(CLASS_A, clA);
         assertCannotLoadClass(clA, CLASS_B);
         Result resultB = new Result();
         try
         {
            BundleInfoBuilder builderB = BundleInfoBuilder.getBuilder().
               createRequireModule("ModuleA", new VersionRange("1.0.0", "2.0.0")).
               createPackage(PACKAGE_B);
            try
            {
               createClassLoader(resultB, "B", builderB, JAR_B_1);
View Full Code Here

      Result rAX = new Result();
      Result rAA = new Result();
      Result rAY = new Result();
      try
      {
         BundleInfoBuilder builderAX = BundleInfoBuilder.getBuilder().
            createModule("ModuleX").
            createPackage(PACKAGE_A);
         clAModuleX = createClassLoader(rAX, "X", builderAX, JAR_A_1);
     
         BundleInfoBuilder builderAA = BundleInfoBuilder.getBuilder().
            createModule("ModuleA").
            createPackage(PACKAGE_A);
         clAModuleA = createClassLoader(rAA, "A", builderAA, JAR_A_1);
        
         BundleInfoBuilder builderAY = BundleInfoBuilder.getBuilder().
            createModule("ModuleY").
            createPackage(PACKAGE_A);
         clAModuleY = createClassLoader(rAY, "Y", builderAY, JAR_A_1);
     
         Class<?> classAX = assertLoadClass(CLASS_A, clAModuleX);
         Class<?> classAA = assertLoadClass(CLASS_A, clAModuleA);
         Class<?> classAY = assertLoadClass(CLASS_A, clAModuleY);
         assertCannotLoadClass(clAModuleX, CLASS_B);
         assertCannotLoadClass(clAModuleA, CLASS_B);
         assertCannotLoadClass(clAModuleY, CLASS_B);
        
         ClassLoader clB = null;
         Result resultB = new Result();
         try
         {
            BundleInfoBuilder builderB = BundleInfoBuilder.getBuilder().
               createRequireModule("ModuleA").
               createPackage(PACKAGE_B);
            clB = createClassLoader(resultB, "B", builderB, JAR_B_1);
            Class<?> classAX1 = assertLoadClass(CLASS_A, clAModuleX);
            assertSame(classAX, classAX1);
View Full Code Here

      Result rA1 = new Result();
      Result rA2 = new Result();
      Result rA3 = new Result();
      try
      {
         BundleInfoBuilder builderA1 = BundleInfoBuilder.getBuilder().
            createModule("ModuleA", "1.0.0").
            createPackage(PACKAGE_A);
         clAModuleA1 = createClassLoader(rA1, "X", builderA1, JAR_A_1);
     
         BundleInfoBuilder builderA2 = BundleInfoBuilder.getBuilder().
            createModule("ModuleA", "2.0.0").
            createPackage(PACKAGE_A);
         clAModuleA2 = createClassLoader(rA2, "A", builderA2, JAR_A_1);
        
         BundleInfoBuilder builderA3 = BundleInfoBuilder.getBuilder().
            createModule("ModuleA", "3.0.0").
            createPackage(PACKAGE_A);
         clAModuleA3 = createClassLoader(rA3, "Y", builderA3, JAR_A_1);
     
         Class<?> classAX = assertLoadClass(CLASS_A, clAModuleA1);
         Class<?> classAA = assertLoadClass(CLASS_A, clAModuleA2);
         Class<?> classAY = assertLoadClass(CLASS_A, clAModuleA3);
         assertCannotLoadClass(clAModuleA1, CLASS_B);
         assertCannotLoadClass(clAModuleA2, CLASS_B);
         assertCannotLoadClass(clAModuleA3, CLASS_B);
        
         ClassLoader clB = null;
         Result rB = new Result();
         try
         {
            BundleInfoBuilder builderB = BundleInfoBuilder.getBuilder().
               createRequireModule("ModuleA", new VersionRange("2.0.0", true, "3.0.0", false)).
               createPackage(PACKAGE_B);
            clB = createClassLoader(rB, "B", builderB, JAR_B_1);
            Class<?> classAX1 = assertLoadClass(CLASS_A, clAModuleA1);
            assertSame(classAX, classAX1);
View Full Code Here

TOP

Related Classes of org.jboss.test.aop.classpool.jbosscl.support.BundleInfoBuilder

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.