You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bcel-user@jakarta.apache.org by Sapan Shah <sa...@patni.com> on 2003/04/09 08:33:11 UTC

Creating Methods in Interface

Hi,
How do I create methods in the interface. The normal MethodGen gives a null
pointer exception.
The interface has already been created.
The code snippet goes below:

MethodGen methodGen = new MethodGen(Constants.ACC_PUBLIC, Type.BOOLEAN,
new Type[0] ,new String[0], "hello",className,il,cp);
methodGen.isInterface(true);
classGen.addMethod(methodGen.getMethod());

It gives me nullPointerException. Even when I write a simple statement like
System.out.println(methodGen);

Thanks and Regards,
Sapan.


---------------------------------------------------------------------
To unsubscribe, e-mail: bcel-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-user-help@jakarta.apache.org