[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] Can we use AspectJ to develop J2ME software?

Lin Chuan

发件人: aspectj-dev-bounces@xxxxxxxxxxx [mailto:aspectj-dev-bounces@eclipse.
org] 代表 Wes Isberg
发送时间: Friday, April 22, 2005 5:13 PM
收件人: AspectJ developer discussions
主题: Re: [aspectj-dev] Can we use AspectJ to develop J2ME software?

Mr. Wang Lin Chuan might have been asking the threshold question whether
AspectJ binaries can be deployed in J2ME.  We have not verified as such, but
designed it to do so.

At a minimum I think the compiler must target 1.1 classes correctly and the
runtime classes in aspectjrt.jar must be supported by the (various flavors
of) J2ME.  Although the runtime is designed to be 1.1-compatible, of late we
haven't done much testing in that area.  (In the AspectJ 1.0 time frame,
developers used the -preprocess switch to get regular .java sources to

It would be a great benefit to the project to have an automated test for
verifying that the runtime classes comply with various J2ME flavors.  If
someone defines that, we'd love to integrate it.  We'd also love to hear if
anyone has tried J2ME lately, and would appreciate if folks do so with the
1.5 milestone releases.

For discussion on point, search the archives (but beware of outdated

For the minimal FAQ entry, see (the nice url):


Thanks -

> ------------Original Message------------
> From: Kev Jackson <kevin.jackson@xxxxxxxxxxxxx>
> To: "AspectJ developer discussions" <aspectj-dev@xxxxxxxxxxx>
> Date: Thu, Apr-21-2005 11:30 PM
> Subject: Re: [aspectj-dev] Can we  use AspectJ to develop J2ME software?
> Well start by determining what the possible cross-cutting concerns are 
> in a J2ME app.
> In a J2EE app they're fairly obvious (logging, tracing, transaction 
> support etc).
> if you're writing a j2me game, perhaps collision detection would be a 
> suitable area for example:
> void updatePlayerPosition (int, x, int y) {
>     if (currentPosition == positionOfAlien) { <-- this check could be 
> moved into an aspect
>        playerEaten;
>     }
>     player.x = x;
>     player.y = y;
> }
> You should be aware that the aspectjrt.jar needs to be included with 
> your application, so space (this being j2me) may prevent you from using 
> any aspects.
> I recommend searching for "refactoring to aspects", it's possibly the 
> best practical introduction to AOP I've come across, and the way it 
> leads you through normal refactorings, can help you to think about 
> where 
> aspects may be useful.
> Hope this helps a little
> Kev
> _______________________________________________
> aspectj-dev mailing list
> aspectj-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-dev

aspectj-dev mailing list