Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AJDT » Initialization pointcut problem
Initialization pointcut problem [message #593623] Wed, 10 May 2006 13:59
Eclipse UserFriend
Originally posted by:


I could not figure out the following initialization pointcut problem. Any
help would be appreciated.

Within the method of my class I do initialization of an object and would
like to replace this object with another object. Hence, I write an around
advice. But the poincut i write is not matched with the object in my class
methosd. To illustrate, the code is simply as follows:

class Test {

public void doTest() {

String s=new String("old String");


// I would like to rewrite String s

public aspect TestAspect {

pointcut p(): initialization(;

void around (): p() {

String s=new String("new String");

But my pointcut p is not matched with the line "String s=new String("old
String");". What am I mssing?

Thanks in advance
Previous Topic:pointcuts using annotations
Next Topic:updating source locations in modified CompilationUnit
Goto Forum:

Current Time: Thu Jun 21 12:44:35 GMT 2018

Powered by FUDForum. Page generated in 0.01898 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top