ld3.addParentDelegation("java.lang.String");
- // loading BarPassFoo
+ // loading & linking BarPassFoo
ct.expect("requested", ld2, "BarPassFoo");
+ ct.expectLoadFromSystem(ld2, "java.lang.Object");
ct.expect("defined", ld2, "<BarPassFoo>");
ct.expect("loaded", ld2, "<BarPassFoo>");
Class cls = ct.loadClass(ld2, "BarPassFoo");
- // linking BarPassFoo
- ct.expectLoadFromSystem(ld2, "java.lang.Object");
-
// executing BarPassFoo.passDerivedFoo: new DerivedFoo
- ct.expectDelegationAndDefinition(ld2, ld3, "DerivedFoo");
+ ct.expectDelegation(ld2, ld3, "DerivedFoo");
// ...linking (ld3, DerivedFoo)
ct.expect("requested", ld3, "Foo");
- ct.expect("defined", ld3, "<Foo>");
ct.expectLoadFromSystem(ld3, "java.lang.Object");
+ ct.expect("defined", ld3, "<Foo>");
+ ct.expectDelegationDefinition(ld2, ld3, "DerivedFoo");
// executing BarPassFoo.passDerivedFoo: new BarUseFoo
- ct.expectDelegationAndDefinition(ld2, ld1, "BarUseFoo");
+ ct.expectDelegation(ld2, ld1, "BarUseFoo");
// ...linking BarUseFoo
ct.expectLoadFromSystem(ld1, "java.lang.Object");
+ ct.expectDelegationDefinition(ld2, ld1, "BarUseFoo");
// resolving BarUseFoo.useFoo
// the deferred subtype check ((ld2, DerivedFoo) subtypeof (ld2, Foo)) is done