[kaffe] Class creation help

Dalibor Topic robilad at kaffe.org
Wed Nov 12 07:42:02 PST 2003


James Simmons wrote:
> I have 3 classes Example1, Example2, and Example3. The inheritance is
> 
> Example1  --> Example2  --> Example3
> 
> Now I try a 
> 
> Class protoClass = Class.forName("Example3");
> Example1 source = (Example1)protoClass.newInstance();
> 
> Later I attempt to use Example1 as Example3. Now when I attempt to use 
> source only the constructor for Example2 and Example 1 are called.
> Why is this?

Uh ... do you have a test case? ;)

cheers,
dalibor topic





More information about the kaffe mailing list