assertLoadClass(A.class, clA2);
assertLoadClassFail(B.class, clA2);
assertLoadClassFail(C.class, clA2);
MockClassLoadingMetaData b1 = new MockClassLoadingMetaData("b", "1.0.0");
b1.getRequirements().addRequirement(factory.createRequireModule("a", new VersionRange("1.0.0", "2.0.0")));
b1.setPathsAndPackageNames(B.class);
KernelControllerContext contextB1 = install(b1);
try
{
ClassLoader clB1 = assertClassLoader(contextB1);
assertLoadClass(B.class, clB1);
assertLoadClass(A.class, clB1, clA1);
assertLoadClassFail(C.class, clB1);
MockClassLoadingMetaData c1 = new MockClassLoadingMetaData("c", "1.0.0");
c1.getRequirements().addRequirement(factory.createRequireModule("b"));
c1.getRequirements().addRequirement(factory.createRequireModule("a", new VersionRange("2.0.0", "3.0.0")));
c1.setPathsAndPackageNames(C.class);
KernelControllerContext contextC1 = install(c1);
try
{
assertNoClassLoader(contextC1);
}
finally
{
uninstall(contextC1);
}
assertNoClassLoader(contextC1);
c1 = new MockClassLoadingMetaData("c", "1.0.0");
c1.getRequirements().addRequirement(factory.createRequireModule("b"));
c1.getRequirements().addRequirement(factory.createRequireModule("a", new VersionRange("1.0.0", "2.0.0")));
c1.setPathsAndPackageNames(C.class);
contextC1 = install(c1);
try
{
ClassLoader clC1 = assertClassLoader(contextC1);