Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AspectJ » How to exclude a specific field from a pointcut?
How to exclude a specific field from a pointcut? [message #586615] Mon, 14 February 2005 14:05
Michael Moser is currently offline Michael MoserFriend
Messages: 914
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.

------=_NextPart_000_0006_01C512A6.AC711390
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

For my check for serializablity I want to exclude a specific field:=20

The original part of the pointcut reads:
...
set (!transient (Object+ && !Serializable+) =
for.bar.SomeClassName+.*) ||
...

Now, to exclude one specific field instead of the "*" I wrote =
"!fieldToBeExcluded":
...
set (!transient (Object+ && !Serializable+) =
for.bar.SomeClassName+.!fieldToBeExcluded) ||
...

....but that doesn't seem to work. I also tried other brackets around the =
fieldname, i.e.:=20
...
set (!transient (Object+ && !Serializable+) (for.bar.SomeClassName+.* =
&&=20
=
!for.bar.SomeClassName.fieldToBeExcluded)) ||
...
or
...
set (!transient ((Object+ && !Serializable+) for.bar.SomeClassName+.* =
&&=20
!(Object+ && !Serializable+) =
for.bar.SomeClassName.fieldToBeExcluded)) ||
...
or
...
set (!( transient (Object+ && !Serializable+) for.bar.SomeClassName+.* =
&&=20
!transient (Object+ && !Serializable+) =
for.bar.SomeClassName.fieldToBeExcluded)) ||
...

and a few other attempts, but none seem to work.How do I specify "all =
fields of a class (and it's derivatives) except a specific one"???

Michael
------=_NextPart_000_0006_01C512A6.AC711390
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2604" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff background=3D""><FONT face=3DArial><FONT =
size=3D2>For my check=20
for serializablity I want to exclude a specific field: <BR><BR>The =
original part=20
of the pointcut reads:<BR></FONT><FONT size=3D2><FONT=20
face=3DCourier>&nbsp;&nbsp;&nbsp; ...<BR>&nbsp;&nbsp;&nbsp; set =
(!transient=20
(Object+ &amp;&amp; !Serializable+) for.bar.SomeClassName+.*)=20
||<BR>&nbsp;&nbsp;&nbsp; ...<BR></FONT><BR>Now, to exclude one specific =
field=20
instead of the "*" I wrote "!fieldToBeExcluded":<BR></FONT><FONT =
size=3D2><FONT=20
face=3DCourier><FONT=20
face=3DArial>&nbsp;&nbsp;&nbsp;&nbsp;</FONT >...<BR>&nbsp;&nbsp;set =
(!transient=20
(Object+ &amp;&amp; !Serializable+) =
for.bar.SomeClassName+.!fieldToBeExcluded)=20
||<BR>&nbsp;&nbsp;...<BR></FONT><BR>...but that doesn't seem to work. I =
also=20
tried other brackets around the fieldname, i.e.:&nbsp;<BR></FONT><FONT=20
face=3DCourier size=3D2><FONT=20
face=3DArial>&nbsp;&nbsp;&nbsp;&nbsp;</FONT >...<BR></FONT><FONT =
size=3D2><FONT=20
face=3DCourier>&nbsp;&nbsp;set (!transient (Object+ &amp;&amp; =
!Serializable+)=20
(for.bar.SomeClassName+.*=20
&amp;&amp;&nbsp;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
!for.bar.SomeClassName.fieldToBeExcluded))=20
||<BR>&nbsp;&nbsp;...<BR></FONT>or<BR></FONT> <FONT size=3D2><FONT=20
face=3DCourier>&nbsp;&nbsp;...<BR>&nbsp;&nbsp;set (!transient ((Object+ =
&amp;&amp;=20
!Serializable+) for.bar.SomeClassName+.*=20
&amp;&amp;&nbsp;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;=20
!(Object+ &amp;&amp; !Serializable+) =
for.bar.SomeClassName.fieldToBeExcluded))=20
||<BR>&nbsp;&nbsp;...<BR></FONT>or<BR></FONT> <FONT size=3D2><FONT=20
face=3DCourier>&nbsp;&nbsp;...<BR>&nbsp; set (!( transient (Object+ =
&amp;&amp;=20
!Serializable+) for.bar.SomeClassName+.* =
&amp;&amp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp;&nbsp; !transient (Object+ &amp;&amp; !Serializable+)=20
for.bar.SomeClassName.fieldToBeExcluded))=20
||<BR>&nbsp;&nbsp;...<BR></FONT><BR>and a few other attempts, but none =
seem to=20
work.How do I specify "all fields of a class (and it's derivatives) =
except a=20
specific one"???<BR><BR>Michael</FONT></FONT></BODY></HTML>

------=_NextPart_000_0006_01C512A6.AC711390--
Previous Topic:Cannot create part for *.aj file?
Next Topic:How to exclude a specific field from a pointcut?
Goto Forum:
  


Current Time: Tue Sep 24 11:12:42 GMT 2024

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

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

Back to the top