Re: [aspectj-users] java.lang.VerifyError attempting to construct an object with ITD that extends a generic class

2007-10-18 Thread Andy Clement
you should raise a crash like this in bugzilla Andy. On 19/10/2007, Caplan, Josh <[EMAIL PROTECTED]> wrote: > > > > > The following code will crash upon execution: > > > > package bugs; > > > > class GenericClass< K > { > > public void f() {} > > } > > class ExtendsGenericHasITD extends

[aspectj-users] java.lang.VerifyError attempting to construct an object with ITD that extends a generic class

2007-10-18 Thread Caplan, Josh
The following code will crash upon execution: package bugs; class GenericClass< K > { public void f() {} } class ExtendsGenericHasITD extends GenericClass< Object > {} aspect VerifyError { public void ExtendsGenericHasITD.f() { super.f(); }

Re: [aspectj-users] Dynamically modifying Java class structure

2007-10-18 Thread Dean Wampler
On Oct 17, 2007, at 8:48 AM, Hendrik Gani wrote: ... Hi guys, In my case, my program doesn't need to be able to swap the loaded class at runtime, but just out of curiosity, is it really possible to unload a class in Java as mentioned by Kevin? Apparently it is: http://www.zeroturnaroun

Re: [aspectj-users] Using inter-type declaration in base class

2007-10-18 Thread Andy Clement
This is the well known problem that the java editor, used for .java files has no idea where the field x is - and the eager parsing that gives you the red squigglies highlights it as missing. You can switch files that use ITDs in this way to being in .aj files, that will stop the error appearing I

Re: [aspectj-users] Dynamically modifying Java class structure

2007-10-18 Thread Hendrik Gani
Eric Bodden wrote: Hi, Hendrik. What do you mean by "dynamically"? Do you mean "at runtime"? If so, that's impossible to do... Eric Hi Eric, thanks for the reply. Yes, by "dynamic", I mean weaving/modifying a class whose name is only known at runtime. Hendrik On 16/10/2007, Hendrik

Re: [aspectj-users] Dynamically modifying Java class structure

2007-10-18 Thread Hendrik Gani
>> Many years ago before I knew about AJ, I created a program that >> writes a Java program, invokes the compiler, then uses reflection to >> load the created program. Couldn't he do something similar and use >> AJ to simplify the modification process? Admittedly, he might need >> to start a chi

[aspectj-users] Using inter-type declaration in base class

2007-10-18 Thread Martin Goerg
Hi, I have a class A {} and then introduce a new filed with aspect AugmentA { public int A.x == 0; } . As I understand it, because x is public, I should be able to use it in A. But the following code produces a compiler error. clas A { void incX() { x++ }; } What am I doing wrong or what is the

Re: [aspectj-users] Using inter-type declaration in base class

2007-10-18 Thread Martin Goerg
Hi again, I just figured out it is only Eclipse who indicates an error. The program actually compiles fine and the public variable is indeed usable in other classes. The guys working on AJDT probably know about this, right? Cheers Martin - Original Message - From: "Martin Goerg" <[EMAIL

Re: [aspectj-users] ITD conflicts with itself (!!!)

2007-10-18 Thread Andy Clement
Raised as https://bugs.eclipse.org/bugs/show_bug.cgi?id=206732 On 18/10/2007, Caplan, Josh <[EMAIL PROTECTED]> wrote: > > > > > I have the following 2 files: > > > > Advised.aj: > > > > package bugs; > > > > public class Advised {} > > aspect ITD { > > public void Advised.f() {} > > } >