Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] Weird syntax-error

Hi Tobias

I had some observations about your code.

1.The around advice is expected to have a return type

I tried 'void' in your code snippet and the compiler vanished.

2.Dunno if it is a typo in the mail,thisJointPoint.toLongString() should be 

thisJointPoint.toLongString()...i.e it is not Joint only Join

The modified snippet which compiled in Eclipse was 

public aspect ScriptingAspect {
	   
	   pointcut executeStringSetter() : execution(public void
Cell.setRow(Row)); // Here comes the error.
	   
	   void around() : executeStringSetter() {
	      System.out.println(thisJoinPoint.toLongString());
	   }

	}

Regards
Ramakrishnan

-----Original Message-----
From: aspectj-users-bounces@xxxxxxxxxxx
[mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Tobias Demuth
Sent: Friday, September 14, 2007 1:57 PM
To: aspectj-users@xxxxxxxxxxx
Subject: [aspectj-users] Weird syntax-error

Hello,

my name is Tobias and I'm new to AspectJ and (of course) to this mailing
list. I'm trying to get AspectJ to work together with my current project,
but I have got an syntax error, which I don't understand and which I cannot
reproduce in an easier (aka smaller) project.

Here is my Aspect (the simplest version, that causes the error):

public aspect ScriptingAspect {
   
   pointcut executeStringSetter() :
      execution(public void Cell.setRow(Row)); // Here comes the error.
   
   around() : executeStringSetter {
      System.out.println(thisJointPoint.toLongString());
   }

}

The Classes Cell and Row are in the same Package as this Aspect. The error,
the compiler shows to me, is:

Syntax error on token ";", Type expected after this token

I don't understand, what the compiler is arguing about. As I already said, I
wasn't able to reproduce this error with an less complex project, which I
can show to you anyway if requested.

Thanks for any help or suggestions about the error, kind regards, Tobias
_______________________________________________________________________
Jetzt neu! Schützen Sie Ihren PC mit McAfee und WEB.DE. 3 Monate kostenlos
testen. http://www.pc-sicherheit.web.de/startseite/?mc=022220

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users


Back to the top