[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New instance of a class and specialinvoke for <init>



If you generate MyClass2 yourself from scratch, it will not have any
methods unless you generate some. So, if you need it to have an <init>
method, you need to generate one.

Ondrej

On Fri, Nov 21, 2003 at 05:35:48PM +0100, Emil Slusanschi wrote:
> Unfortunately, it it not compiled from Java code, it is generated from a 
> SceneTransformer, before the BodyTransformer can get a hand on it... Is 
> there a way to get a reference to <init> it this way? I sure hope there 
> is ;-) And I did load and support for the generated MyClass2 class but 
> it has _no_ methods in it!
> 
> I had the ideea to _create_ the <init> method in MyClass2 in the 
> SceneTransformer but I wasn't able to do it until now. I really would 
> like to be able to do it with the freshly generated class...
> 
> Emil
> 
> Feng Qian wrote:
> > 
> >>         specialinvoke z2.<MyClass2: void <init>()>();
> >>
> >> invoke generated. Does somebody have an idea how can I get this done? 
> >> Method <init> is not a _real_ method and that's why I can't get it 
> >> with z2(Handler).getMethod(*).
> > 
> > 
> > 
> > If your MyClass2 is compiled from Java source code, it will have an 
> > <init> method.  You may need to load and support the class first, then 
> > you can get the <init> method.
> > 
> > 
> > 
> 
> 
>