[Soot-list] cloning and renaming constructors

Eric Bodden bodden at st.informatik.tu-darmstadt.de
Sat Nov 13 08:17:13 EST 2010


Hi Khilan.

Yes, <init> is a special name..

In particular, the bytecode verifier requires <init> to be called on
every newly constructed object before the object is used any further.

Also, I think that <init> and <clinit> are the only methods that may
have a "<>" in their name.

Eric

--
Dr. Eric Bodden
Software Technology Group, Technische Universität Darmstadt, Germany
Tel: +49 6151 16-5478    Fax: +49 6151 16-5410
Mailing Address: S2|02 A209, Hochschulstraße 10, 64289 Darmstadt



On 12 November 2010 21:12, Khilan Gudka <khilan at doc.ic.ac.uk> wrote:
> Hi all,
> I was just wondering if it was possible to clone <init> methods and then
> rename the cloned versions to something like <init_clone>? Or does Java
> require instance initialisers to have the name <init>? I tried it and I get
> a ClassFormatException saying that the method name is bad.
> Thanks,
> Khilan
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
>


More information about the Soot-list mailing list