trhouse | 9 Feb 23:09
Picon
Gravatar

Capturing join points based on thread

Hi all,
  I want to exclude join points based on the thread.

Example. I want to capture all method calls on class Foo unless those 
methods were being executed on thread X.

Is this possible?

Thank you.
Eric Bodden | 5 Feb 12:21
Picon
Gravatar

Student Events at MODULARITY: aosd 2012

                     << ANNOUNCEMENT OF STUDENT EVENTS >>

=======================================================================

 11th International Conference on Aspect-Oriented Software Development
                        MODULARITY: aosd 2012

                    Announcement of Student Events
         http://www.aosd.net/2012/program/student-events.html
                          students <at> aosd.net

                          March 25-30, 2012
               Hasso-Plattner-Institut Potsdam, Germany

=======================================================================

We'd like to announce the student events for the upcoming MODULARITY:
aosd•2012 conference. These events are a valuable experience to meet
other students, to identify new research ideas, and to present results
to other researchers.

*** Student Grants for AOSD Registration ***

We are happy to announce that AOSD Europe will fund up to 10 grants
supporting student registrations for MODULARITY: aosd•2012. We target
a balanced mix of European countries and select students based on
received applications (a short motivation letter with no more than
250 words).

Please note: The grants are limited to students from European
(Continue reading)

Eric Bodden | 5 Feb 12:09
Picon
Gravatar

MODULARITY: aosd.2012 - Call for Participation

                     << CALL FOR PARTICIPATION >>

=======================================================================

    11th International Conference on Aspect-Oriented Software Development
                        MODULARITY: aosd 2012
                        http://aosd.net/2012
                         March 25-30, 2012
              Hasso-Plattner-Institut Potsdam, Germany

=======================================================================

The full program is online and registration is open.

Deadline for early registration: February 20, 2012
See: http://aosd.net/2012

In cooperation with:
* ACM SIGSOFT
* ACM SIGPLAN

Sponsors:
* Oracle
* SAP Innovation Center Potsdam
* Microsoft Research
* AOSD-Europe
* AOSA
* Hasso-Plattner-Institut Potsdam

=======================================================================
(Continue reading)

pss | 18 Jan 17:34
Picon

pss wants to chat

-----------------------------------------------------------------------

pss wants to stay in better touch using some of Google's coolest new
products.

If you already have Gmail or Google Talk, visit:
http://mail.google.com/mail/b-639a8160d1-510f253a5f-nr1QmlTbvR-R1L9R8_dqKeIJxdc
You'll need to click this link to be able to chat with pss.

To get Gmail - a free email account from Google with over 2,800 megabytes of
storage - and chat with pss, visit:
http://mail.google.com/mail/a-639a8160d1-510f253a5f-nr1QmlTbvR-R1L9R8_dqKeIJxdc

Gmail offers:
- Instant messaging right inside Gmail
- Powerful spam protection
- Built-in search for finding your messages and a helpful way of organizing
  emails into "conversations"
- No pop-up ads or untargeted banners - just text ads and related information
  that are relevant to the content of your messages

All this, and its yours for free. But wait, there's more! By opening a Gmail
account, you also get access to Google Talk, Google's instant messaging
service:

http://www.google.com/talk/

Google Talk offers:
- Web-based chat that you can use anywhere, without a download
- A contact list that's synchronized with your Gmail account
(Continue reading)

pss | 15 Jan 10:39
Picon

pss wants to chat

-----------------------------------------------------------------------

pss wants to stay in better touch using some of Google's coolest new
products.

If you already have Gmail or Google Talk, visit:
http://mail.google.com/mail/b-639a8160d1-e34f7fcba6-v0toHyv6VlvJ2klSYBHgos8xdFM
You'll need to click this link to be able to chat with pss.

To get Gmail - a free email account from Google with over 2,800 megabytes of
storage - and chat with pss, visit:
http://mail.google.com/mail/a-639a8160d1-e34f7fcba6-v0toHyv6VlvJ2klSYBHgos8xdFM

Gmail offers:
- Instant messaging right inside Gmail
- Powerful spam protection
- Built-in search for finding your messages and a helpful way of organizing
  emails into "conversations"
- No pop-up ads or untargeted banners - just text ads and related information
  that are relevant to the content of your messages

All this, and its yours for free. But wait, there's more! By opening a Gmail
account, you also get access to Google Talk, Google's instant messaging
service:

http://www.google.com/talk/

Google Talk offers:
- Web-based chat that you can use anywhere, without a download
- A contact list that's synchronized with your Gmail account
(Continue reading)

pss | 15 Jan 10:39
Picon

pss wants to chat

-----------------------------------------------------------------------

pss wants to stay in better touch using some of Google's coolest new
products.

If you already have Gmail or Google Talk, visit:
http://mail.google.com/mail/b-639a8160d1-f362700638-PDl-Wo74ydnP85NvCMbL3Ja1dns
You'll need to click this link to be able to chat with pss.

To get Gmail - a free email account from Google with over 2,800 megabytes of
storage - and chat with pss, visit:
http://mail.google.com/mail/a-639a8160d1-f362700638-PDl-Wo74ydnP85NvCMbL3Ja1dns

Gmail offers:
- Instant messaging right inside Gmail
- Powerful spam protection
- Built-in search for finding your messages and a helpful way of organizing
  emails into "conversations"
- No pop-up ads or untargeted banners - just text ads and related information
  that are relevant to the content of your messages

All this, and its yours for free. But wait, there's more! By opening a Gmail
account, you also get access to Google Talk, Google's instant messaging
service:

http://www.google.com/talk/

Google Talk offers:
- Web-based chat that you can use anywhere, without a download
- A contact list that's synchronized with your Gmail account
(Continue reading)

pss | 15 Jan 10:37
Picon

Problem in specifying "target"


I have an AspectJ program which derives the trace/ call graph of a given Java program.
To capture the joinpoint I have used :

pointcut p(): call(* *(..))  &&( (target(Code)));  // Code is the lone class in the input program

In my call graph I want the functions which are user defined only . Call to inbuilt functions should not be captured.
But my problem is that if I change my input java program ,I have to manually change the class names in target() in the aspect
Is there a way to do this automatically in AspectJ?

Thank You
Preeti

_______________________________________________
aspectj-users mailing list
aspectj-users <at> eclipse.org
https://dev.eclipse.org/mailman/listinfo/aspectj-users
Dénes Németh | 15 Jan 09:14
Picon

matching all functions declared in a certain interface

Hi

How is it possible to match all functions declared in a certain interface
without specifying them one by one.
Logically the following would be on, but AspectJ reports syntax error.
(because IdPattern can not contain +), but I assume that this is
possible somehow.

pointcut p1() : execution (void Interface1+(..));

public interface Interface1 {
   public void func();
   //let's assume that we have a  lot of functions here
}

classs Simple1 implements Interface1 {
   public void func(){
      System.out.println("test");
   }
}
	
Thanks, Denes
Arata Yamamoto | 15 Jan 01:52
Picon

Is @DeclareMixin + around advice supported?

Hello,

I would like to know whether it is supported to use <at> DeclareMixin & around advice in the way like below:
     public interface KeySetKeyLockHandler {
          // method signatures
     }
    
     public static class KeySetKeyLockHandlerImpl implements KeySetKeyLockHandler {
          // contents of class
     }
    
     <at> DeclareMixin( value="slingong.web.gae.TransactionalMemcacheServiceImpl")
     public static KeySetKeyLockHandler addKeySetKeyLockHandlerInterface( Object instance) {
          return new KeySetKeyLockHandlerImpl( (TransactionalMemcacheServiceImpl)instance);
     }
    
     <at> Around( value="execution( "
                              + "public * slingong.web.gae.TransactionalMemcacheServiceBase+"
                                   + ".setKeySetKey( java.lang.String)) "
                         + "&& this( keySetKeyLockHandler)"
               )
     public Object aroundAdvisedSetKeySetKeyMethodExecution(
               ProceedingJoinPoint proceedingJoinPoint, KeySetKeyLockHandler keySetKeyLockHandler) {
              
               // Do some works on keySetKeyLockHandler
              
               // Invocation of actual target method -------------------------------------------------
               try {
                    return proceedingJoinPoint.proceed( proceedingJoinPoint.getArgs());
               }
               catch( Throwable throwable) {
                    // Exception handling
               }
               // ------------------------------------------------------------------------------------
              
               // Do some works on keySetKeyLockHandler
     }
    
      Note: 
          KeySetKeyLockHandler interface does not contain the definition of the setKeySetKey method.
          TransactionalMemcacheServiceImpl class is extended from TransactionalMemcacheServiceBase abstract class

I abbreviated the details from the actual code for easier readability. 

What I expected was that, of course, calling the proceed method in the code snippet above executes setKeySetKey method of TransactionalMemcacheServiceImpl instance.
However, it fails at that statement by the puzzling ClassCastException like:
     slingong.web.gae.TransactionalMemcacheServiceException: java.lang.ClassCastException: java.lang.String cannot be cast to slingong.web.gae.TransactionalMemcacheServiceBase
          at slingong.web.gae.TransactionalMemcacheServiceBase.setKeySetKey_aroundBody1$advice(TransactionalMemcacheServiceBase.java:456)
          at slingong.web.gae.TransactionalMemcacheServiceBase.setKeySetKey_aroundBody2(TransactionalMemcacheServiceBase.java:1)
          at slingong.web.gae.TransactionalMemcacheServiceBase.setKeySetKey_aroundBody3$advice(TransactionalMemcacheServiceBase.java:578)
          at slingong.web.gae.TransactionalMemcacheServiceBase.setKeySetKey(TransactionalMemcacheServiceBase.java:132)
          at slingong.web.gae.TransactionalMemcacheServiceFactory.getInstance(TransactionalMemcacheServiceFactory.java:180)
          at slingong.web.gae.TransactionalMemcacheServiceFactoryTest.testGetInstance(TransactionalMemcacheServiceFactoryTest.java:93)

As you may notice from the stack trace above, I have 2 around-advices weaving at this join point, and as I said that I omitted the detail, that exception may not be caused of the usage of  <at> DeclareMixin & around advice but from those omitted parts. However, I like to be sure about if it's supported usage before digging deeper to find the cause, since I do not feel so sure about calling ProceedingJoinPoint.proceed method after mixing even though I assumed that it would be OK because I could not have found any document to tell the restriction on such combination.

I ran the test code under debugger and found that it fails at the statement calling proceed method right after getArgs method returns before actually running target setKeySetKey method.
Just before throwing the exception, proceedingJoinPoint appeared as below in debugger (though I eliminated the info on TransactionalMemcacheServiceImpl fields because I thought those would just bloated lines of info without clue.) It appears to me that the proceedingJoinPoint seems to be expected...

proceedingJoinPoint     JoinPointImpl  (id=49)    
     _this     TransactionalMemcacheServiceImpl  (id=44)    
          $SWITCH_TABLE$com$google$appengine$api$memcache$MemcacheService$SetPolicy     null    
          ajc$anno$0     null    
          ajc$aspectjutil_eventmanager_EventListenerInstanceTracker$ptwAspectInstance     EventListenerInstanceTracker  (id=55)    
               ajc$withinType     "slingong.web.gae.TransactionalMemcacheServiceBase" (id=106)    
               listenerMap     WeakHashMap<K,V>  (id=107)    
          ajc$aspectjutil_eventmanager_EventListenerInstanceTracker$ptwAspectInstance     EventListenerInstanceTracker  (id=72)    
               ajc$withinType     "slingong.web.gae.TransactionalMemcacheServiceImpl" (id=111)    
               listenerMap     WeakHashMap<K,V>  (id=112)    
          ajc$instance$slingong_web_gae_TransactionalMemcacheServiceBaseThreadSyncAspect$slingong_web_gae_TransactionalMemcacheServiceBaseThreadSyncAspect$KeySetKeyLockHandler     TransactionalMemcacheServiceBaseThreadSyncAspect$KeySetKeyLockHandlerImpl  (id=73)    
               transactionalMemcacheServiceImpl     TransactionalMemcacheServiceImpl  (id=44)    
     arc     null    
     args     Object[1]  (id=101)    
          [0]     "testGetInstance_keySetKey" (id=67)    
     staticPart     JoinPointImpl$StaticPartImpl  (id=103)    
          id     1    
          kind     "method-execution" (id=115)    
               count     16    
               hash     0    
               offset     0    
               value     (id=128)    
          signature     MethodSignatureImpl  (id=116)    
               EMPTY_CLASS_ARRAY     Class<T>[0]  (id=129)    
               EMPTY_STRING_ARRAY     String[0]  (id=131)    
               useCache     true    
               declaringType     Class<T> (slingong.web.gae.TransactionalMemcacheServiceBase) (id=43)    
               declaringTypeName     "slingong.web.gae.TransactionalMemcacheServiceBase" (id=106)    
               exceptionTypes     Class<T>[0]  (id=137)    
               lookupClassLoader     null    
               method     null    
               modifiers     1    
               name     "setKeySetKey" (id=138)    
               parameterNames     String[1]  (id=139)    
                    [0]     "newKeysSetKey" (id=141)    
               parameterTypes     Class<T>[1]  (id=140)    
                    [0]     Class<T> (java.lang.String) (id=68)    
               returnType     Class<T> (void) (id=142)    
               stringCache     SignatureImpl$CacheImpl  (id=143)    
                    toStringCacheRef     SoftReference<T>  (id=149)    
                         clock     1326542103609    
                         lock     Reference$Lock  (id=152)    
                         pending     null    
                         discovered     null    
                         next     null    
                         queue     ReferenceQueue$Null  (id=154)    
                         referent     String[3]  (id=157)    
                              [0]     "void slingong.web.gae.TransactionalMemcacheServiceBase.setKeySetKey(String)" (id=161)    
                              [1]     null    
                              [2]     null    
                         timestamp     1326542103609    
               stringRep     null    
          sourceLocation     SourceLocationImpl  (id=118)    
               fileName     "TransactionalMemcacheServiceBase.java" (id=162)    
               line     130    
               withinType     Class<
_______________________________________________
aspectj-users mailing list
aspectj-users <at> eclipse.org
https://dev.eclipse.org/mailman/listinfo/aspectj-users
Dénes Németh | 14 Jan 18:33
Picon

using @annotation to select annotated aspects

Hi

Does @annotation work on aspects too? I could not come up with a
working example.
Logically I assume that the call of simple2.foo is caught by the p1
pointcut in Test2, and
since Test2 is annoted with Annotation2 than the System.out.println
call should be
caught by Test1 / p8. Is this correct?

@Retention(RetentionPolicy.RUNTIME)
public @interface Annotation2 { }

public class Simple {
	public void foo2(){ System.err.print("foo2"); }
}

aspect Test1{
     pointcut p8() : @annotation(Annotation2);
     before () : p8() { System.out.println("p8");
}

@Annotation2
aspect Test2{
	pointcut p1() : call(void Simple.foo2());
	before () : p1(){ System.err.println("lexical2"); }
}

public class Main{
   public static void main(String[]args){
       Simple s = new Simple();
       s.foo2();
   }
}

Many thanks,
Denes
Andy Clement | 11 Jan 22:32
Picon

AspectJ moved from CVS to GIT

AspectJ has moved from a CVS repository to a GIT repository.  We've
tidied up a bunch of stuff in the move, there are now two repositories
which you can browse here:

http://git.eclipse.org/c/aspectj/

The repositories are:

git://git.eclipse.org/gitroot/aspectj/org.aspectj.git
- which is the main body of AspectJ, the matcher, weaver, etc.  This
was traditionally under the 'modules' area in CVS.

git://git.eclipse.org/gitroot/aspectj/org.aspectj.shadows.git
- this is the modified JDT compiler source code, which was under
'shadows' in CVS.  Most developers don't typically need to go in here.

The tool that was used was intended to preserve file histories, etc -
it appears to have done mostly ok on the main code but I know it has
messed up at least one branch (in shadows) that I'm currently
repairing.  I'm not sure about tags, it may have made mistakes there
but I guess I'll find out the first time I need to fall back on one.
CVS will go into read only now and be archived in 6 months.

If anyone tries it and sees a problem, let us know.

cheers,
Andy

Gmane