Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] array pointcuts?



Mark,

There is no initialization (or preinitialization) joint point for array
types as they do not have constructors. They do have a staticinitialization
join point but this is not accessible as array classes are generated at
runtime by the JVM.

      String s = new String();            // Call constructor
      String sa = new String[1];    // No constructor

See this thread:
http://dev.eclipse.org/mhonarc/lists/aspectj-users/msg02494.html

In addition there is no array element get/set pointcut, these are both
treated as get join points on the array object itself, so there is no way
of telling which array element is being accessed or what it's value is. The
initial array allocation is a set join point. There has been some
discussion on this subject
http://dev.eclipse.org/mhonarc/lists/aspectj-users/msg00932.html before
although none on aspectj-dev so you might like to request an enhancement to
the pointcut language there.

Matthew Webster
AOSD Project
Java Technology Centre, MP146
IBM Hursley Park, Winchester,  SO21 2JN, England
Telephone: +44 196 2816139 (external) 246139 (internal)
Email: Matthew Webster/UK/IBM @ IBMGB, matthew_webster@xxxxxxxxxx
http://w3.hursley.ibm.com/~websterm/


"Mark van der Kraan" <mark@xxxxxxxxxxxxxxxx>@eclipse.org on 21/09/2004
14:53:53

Please respond to aspectj-users@xxxxxxxxxxx

Sent by:    aspectj-users-admin@xxxxxxxxxxx


To:    <aspectj-users@xxxxxxxxxxx>
cc:
Subject:    [aspectj-users] array pointcuts?


Hi,

I am somewhat surprised that there seems to be no support for pointcut
expressions
for array creation and array read/write access, similar to pointcuts for
object creation and
get/set field access. Am I wrong? And if I'm right, are there any plans for
adding
these in the future?

Cheers,
Mark
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users





Back to the top