prashant pandit | 7 Aug 04:27 2006
Picon

Need help on BCEL

Hi,

  I am new to BCEL.I need your help.Please let me know how to monitor collection object using BCEL.Looking
forward for your responce

  Regards,
  Prashant

 		
---------------------------------
Yahoo! Music Unlimited - Access over 1 million songs.Try it free. 
prashant pandit | 23 Aug 09:56 2006
Picon

Constructor modification using BCEL

Hi,

  I need help.Autually i want to incert some code to the constructor using BCEL.

  Eg:Orignal class
  public class HashMap extends AbstractMap
    implements Map, Cloneable, Serializable
{
  public HashMap(int i, float f)
    {
        entrySet = null;
        keySet = null;
        values = null;
        if(i < 0)
            throw new IllegalArgumentException("Illegal initial capacity: " + i);
        if(i > 0x40000000)
            i = 0x40000000;
        if(f <= 0.0F || Float.isNaN(f))
            throw new IllegalArgumentException("Illegal load factor: " + f);
        int j;
        for(j = 1; j < i; j <<= 1);
        loadFactor = f;
        threshold = (int)((float)j * f);
        table = new Entry[j];
        init();
    }
  }

  After modification using  BCEL
  public class HashMap extends AbstractMap
(Continue reading)

Vanesa Montagna | 23 Aug 15:09 2006
Picon

Re: Constructor modification using BCEL

Me gustaria ayudarte pero no entiendo que necesitas, no manejo muy bien el
ingles, nesecitas modificar el constructor de una clase ????

Saludos

Vanesa

2006/8/23, prashant pandit <prashant_pandit77 <at> yahoo.com>:
>
> Hi,
>
> I need help.Autually i want to incert some code to the constructor using
> BCEL.
>
> Eg:Orignal class
> public class HashMap extends AbstractMap
>    implements Map, Cloneable, Serializable
> {
> public HashMap(int i, float f)
>    {
>        entrySet = null;
>        keySet = null;
>        values = null;
>        if(i < 0)
>            throw new IllegalArgumentException("Illegal initial capacity: "
> + i);
>        if(i > 0x40000000)
>            i = 0x40000000;
>        if(f <= 0.0F || Float.isNaN(f))
>            throw new IllegalArgumentException("Illegal load factor: " +
(Continue reading)

ss | 28 Aug 19:07 2006
Picon

Re: java.lang.VerifyError: "method: <init> signature: ()V) Call to wrong initialization method" after specifying superclass


I am having the same problem . I did verify and got this.

[Pass 2: Attribute '<LineNumberTable: LineNumber(0, 27), LineNumber(5, 28)>'
as an attribute of Code attribute '<CODE>' (method 'public void
<init>(psdi.mbo.MboServerInterface ms)
		throws psdi.util.MXException, java.rmi.RemoteException') will effectively
be ignored and is only useful for debuggers and such., Pass 2: Attribute
'<LocalVariableTable: LocalVariable(start_pc = 0, length = 6, index =
0:psdi.tnd.app.asset.TNDSparePartSet this)
LocalVariable(start_pc = 0, length = 6, index =
1:psdi.mbo.MboServerInterface ms)>' as an attribute of Code attribute
'<CODE>' (method 'public void <init>(psdi.mbo.MboServerInterface ms)
		throws psdi.util.MXException, java.rmi.RemoteException') will effectively
be ignored and is only useful for debuggers and such., Pass 2: Attribute
'<LineNumberTable: LineNumber(0, 35)>' as an attribute of Code attribute
'<CODE>' (method 'protected psdi.mbo.Mbo getMboInstance(psdi.mbo.MboSet ms)
		throws psdi.util.MXException, java.rmi.RemoteException') will effectively
be ignored and is only useful for debuggers and such., Pass 2: Attribute
'<LocalVariableTable: LocalVariable(start_pc = 0, length = 2, index =
0:psdi.tnd.app.asset.TNDSparePartSet this)
LocalVariable(start_pc = 0, length = 2, index = 1:psdi.mbo.MboSet ms)>' as
an attribute of Code attribute '<CODE>' (method 'protected psdi.mbo.Mbo
getMboInstance(psdi.mbo.MboSet ms)
		throws psdi.util.MXException, java.rmi.RemoteException') will effectively
be ignored and is only useful for debuggers and such.]

Is it ignoring all super call?

Dave Brosius wrote:
(Continue reading)

Pico Florin | 31 Aug 13:48 2006
Picon

Get annotations using BCEL API

Hi!
   I have the latest version of BCEL API and I want to know how can I obtain the annotations that are in the class file.

  Thank you,
    Florin

 		
---------------------------------
 Now you can scan emails quickly with a reading pane. Get the new Yahoo! Mail.
Pico Florin | 31 Aug 16:10 2006
Picon

Obtain the generic parameter for a returned type

Hi, all!
    I want to know if in the latest version of BCEL it is possible to obtain the generic prameter for a returned
type from a method.

  For example

    Map<String, Object> getMap()

  I want to obtain the String,Object classes in an array.

  Thank you,
   Florin 

 		
---------------------------------
 Inbox full of spam? Get leading spam protection and 1GB storage with All New Yahoo! Mail.
Jacob Kjome | 31 Aug 18:27 2006

Re: Obtain the generic parameter for a returned type


I don't believe this is stored in the bytecode.  Look up "generics erasure" in
your favorite search engine.

Jake

Quoting Pico Florin <picoflorin <at> yahoo.co.uk>:

> Hi, all!
>     I want to know if in the latest version of BCEL it is possible to obtain
> the generic prameter for a returned type from a method.
>
>   For example
>
>     Map<String, Object> getMap()
>
>   I want to obtain the String,Object classes in an array.
>
>   Thank you,
>    Florin
>
>
> ---------------------------------
>  Inbox full of spam? Get leading spam protection and 1GB storage with All New
> Yahoo! Mail.
Vanesa Montagna | 31 Aug 19:07 2006
Picon

Re: Get annotations using BCEL API

Hi Pico Florin, Can you send me the latest version of BCEL API?????

Sorry for my ingles, I am speak spanish.

Vane

2006/8/31, Pico Florin <picoflorin <at> yahoo.co.uk>:
>
> Hi!
>   I have the latest version of BCEL API and I want to know how can I
> obtain the annotations that are in the class file.
>
> Thank you,
>    Florin
>
>
> ---------------------------------
> Now you can scan emails quickly with a reading pane. Get the new Yahoo!
> Mail.
>
Vanesa Montagna | 31 Aug 19:11 2006
Picon

Re: Obtain the generic parameter for a returned type

Hi Pico Florin I want to know how insert a new attribute to the methods...

I need know if a method is low,higt ...

Thank you

vane

2006/8/31, Pico Florin <picoflorin <at> yahoo.co.uk>:
>
> Hi, all!
>    I want to know if in the latest version of BCEL it is possible to
> obtain the generic prameter for a returned type from a method.
>
> For example
>
>    Map<String, Object> getMap()
>
> I want to obtain the String,Object classes in an array.
>
> Thank you,
>   Florin
>
>
> ---------------------------------
> Inbox full of spam? Get leading spam protection and 1GB storage with All
> New Yahoo! Mail.
>

Gmane