On Wed, Feb 18, 2004 at 02:14:20AM -0800, Nikhil C. Khedkar wrote:
> Well no peoblem with detecting the constructor. The
> approach you have mentioned is not full proof. In my
> constructor I have the following code, few lines down
> the line
>
> if (!(type == MAINUI || type == PROJECTWIZARD))
> {
> throw new RuntimeException("Invalid type");
> }
>
> Even this chap has INVOKESPECIAL and I end up skipping
> some of the lines and in fact this line also, if I use
> your approach, which I had already tried.
If you do "getClassName" in the INVOKESPECIAL instruction does
that tell you the class that we are calling? Or should we
be using a different function. The documentation is a little
sparse...
http://jakarta.apache.org/bcel/apidocs/org/apache/bcel/generic/FieldOrMethod.html#getClassType(org.apache.bcel.generic.ConstantPoolGen)
(linked from
http://jakarta.apache.org/bcel/apidocs/org/apache/bcel/generic/INVOKESPECIAL.html )
--
Erik Corry I'd be a Libertarian, if they weren't all a
[EMAIL PROTECTED] bunch of tax-dodging professional whiners. - B. Breathed.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]