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/10 19:07:30 UTC

Extending interfaces

Hi,

I have generated an interface MyInterface through ClassGen. This MyInterface
extends java.io.Serializable interface.
Although the generation is successful and I am able to open it using a
Decompiler.

There is another class which implements MyInterface. But when I try to load
this class through Reflection, I get an error saying that the Interface has
a super class java.io.Serializable.

If you could please guide me for the same. Its kinda urgent.

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


Re: Extending interfaces

Posted by Juozas Baliuka <ba...@centras.lt>.
I have not used BCEL to generate interfaces, but as I remember spec.
interface must extend java.lang.Object and
"extends Itercace1, Itercace2, ..." become "implements" in class file.

----- Original Message -----
From: "Sapan Shah" <sa...@patni.com>
To: "BCEL Users List" <bc...@jakarta.apache.org>
Sent: Thursday, April 10, 2003 7:29 PM
Subject: RE: Extending interfaces


> Thanks for the prompt reply. But as long as I know, My interface can
extend
> can any other interface.
>
> import java.io.Serializable;
>
>
> /**
>  *
>  * Represents any tag int the xml file
>  * @author Sapan Shah
>  * @version 1.0A
>  */
> public interface TagObject extends Serializable {
>     /**
>      *reset all the attribtues
>      */
>     public abstract void resetAll();
> }
>
> The code above works perfectly fine in existing applications, without any
> errors. Or is it that, i need to extend it from java.lang.Object for using
> BCEL?
> Please let me know, if I have misinterpreted your answer.
>
> Thanks and Regards,
> Sapan.
>
>
> -----Original Message-----
> From: Juozas Baliuka [mailto:baliuka@centras.lt]
> Sent: Thursday, April 10, 2003 11:54 PM
> To: BCEL Users List; sapan.shah@patni.com
> Subject: Re: Extending interfaces
>
>
>
> The supercalss of interface must be java.lang.Object, use "addInterface"
to
> "extend/implement" interfaces.
>
> ----- Original Message -----
> From: "Sapan Shah" <sa...@patni.com>
> To: "Bcel-User" <bc...@jakarta.apache.org>
> Sent: Thursday, April 10, 2003 7:07 PM
> Subject: Extending interfaces
>
>
> > Hi,
> >
> > I have generated an interface MyInterface through ClassGen. This
> MyInterface
> > extends java.io.Serializable interface.
> > Although the generation is successful and I am able to open it using a
> > Decompiler.
> >
> > There is another class which implements MyInterface. But when I try to
> load
> > this class through Reflection, I get an error saying that the Interface
> has
> > a super class java.io.Serializable.
> >
> > If you could please guide me for the same. Its kinda urgent.
> >
> > 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
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: bcel-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: bcel-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: bcel-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: bcel-user-help@jakarta.apache.org
>


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


Re: Extending interfaces

Posted by Juozas Baliuka <ba...@centras.lt>.
sorry, if comment  was not clear.
"Interface1 extends Interface2" is correct in JAVA source code, but not in
byte code.
BCEL is low level library and uses Class file semantics not JAVA source code
(compilers are used for JAVA language,BCEL for JAVA Class files ).

----- Original Message -----
From: "Sapan Shah" <sa...@patni.com>
To: "BCEL Users List" <bc...@jakarta.apache.org>
Sent: Thursday, April 10, 2003 7:29 PM
Subject: RE: Extending interfaces


> Thanks for the prompt reply. But as long as I know, My interface can
extend
> can any other interface.
>
> import java.io.Serializable;
>
>
> /**
>  *
>  * Represents any tag int the xml file
>  * @author Sapan Shah
>  * @version 1.0A
>  */
> public interface TagObject extends Serializable {
>     /**
>      *reset all the attribtues
>      */
>     public abstract void resetAll();
> }
>
> The code above works perfectly fine in existing applications, without any
> errors. Or is it that, i need to extend it from java.lang.Object for using
> BCEL?
> Please let me know, if I have misinterpreted your answer.
>
> Thanks and Regards,
> Sapan.
>
>
> -----Original Message-----
> From: Juozas Baliuka [mailto:baliuka@centras.lt]
> Sent: Thursday, April 10, 2003 11:54 PM
> To: BCEL Users List; sapan.shah@patni.com
> Subject: Re: Extending interfaces
>
>
>
> The supercalss of interface must be java.lang.Object, use "addInterface"
to
> "extend/implement" interfaces.
>
> ----- Original Message -----
> From: "Sapan Shah" <sa...@patni.com>
> To: "Bcel-User" <bc...@jakarta.apache.org>
> Sent: Thursday, April 10, 2003 7:07 PM
> Subject: Extending interfaces
>
>
> > Hi,
> >
> > I have generated an interface MyInterface through ClassGen. This
> MyInterface
> > extends java.io.Serializable interface.
> > Although the generation is successful and I am able to open it using a
> > Decompiler.
> >
> > There is another class which implements MyInterface. But when I try to
> load
> > this class through Reflection, I get an error saying that the Interface
> has
> > a super class java.io.Serializable.
> >
> > If you could please guide me for the same. Its kinda urgent.
> >
> > 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
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: bcel-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: bcel-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: bcel-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: bcel-user-help@jakarta.apache.org
>


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


RE: Extending interfaces

Posted by Sapan Shah <sa...@patni.com>.
Thanks for the prompt reply. But as long as I know, My interface can extend
can any other interface.

import java.io.Serializable;


/**
 *
 * Represents any tag int the xml file
 * @author Sapan Shah
 * @version 1.0A
 */
public interface TagObject extends Serializable {
    /**
     *reset all the attribtues
     */
    public abstract void resetAll();
}

The code above works perfectly fine in existing applications, without any
errors. Or is it that, i need to extend it from java.lang.Object for using
BCEL?
Please let me know, if I have misinterpreted your answer.

Thanks and Regards,
Sapan.


-----Original Message-----
From: Juozas Baliuka [mailto:baliuka@centras.lt]
Sent: Thursday, April 10, 2003 11:54 PM
To: BCEL Users List; sapan.shah@patni.com
Subject: Re: Extending interfaces



The supercalss of interface must be java.lang.Object, use "addInterface" to
"extend/implement" interfaces.

----- Original Message -----
From: "Sapan Shah" <sa...@patni.com>
To: "Bcel-User" <bc...@jakarta.apache.org>
Sent: Thursday, April 10, 2003 7:07 PM
Subject: Extending interfaces


> Hi,
>
> I have generated an interface MyInterface through ClassGen. This
MyInterface
> extends java.io.Serializable interface.
> Although the generation is successful and I am able to open it using a
> Decompiler.
>
> There is another class which implements MyInterface. But when I try to
load
> this class through Reflection, I get an error saying that the Interface
has
> a super class java.io.Serializable.
>
> If you could please guide me for the same. Its kinda urgent.
>
> 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
>


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


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


Re: Extending interfaces

Posted by Juozas Baliuka <ba...@centras.lt>.
The supercalss of interface must be java.lang.Object, use "addInterface" to
"extend/implement" interfaces.

----- Original Message -----
From: "Sapan Shah" <sa...@patni.com>
To: "Bcel-User" <bc...@jakarta.apache.org>
Sent: Thursday, April 10, 2003 7:07 PM
Subject: Extending interfaces


> Hi,
>
> I have generated an interface MyInterface through ClassGen. This
MyInterface
> extends java.io.Serializable interface.
> Although the generation is successful and I am able to open it using a
> Decompiler.
>
> There is another class which implements MyInterface. But when I try to
load
> this class through Reflection, I get an error saying that the Interface
has
> a super class java.io.Serializable.
>
> If you could please guide me for the same. Its kinda urgent.
>
> 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
>


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