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 #47873] Mon, 14 February 2005 14:05 Go to next message
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--
Re: How to exclude a specific field from a pointcut? [message #47903 is a reply to message #47873] Mon, 14 February 2005 14:42 Go to previous message
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_0008_01C512AB.D25DFE10
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

OK, I finally found out: One has to bracket (and repeat) the entire =
line:

...
(set (!transient (Object+ && !Serializable+) for.bar.SomeClassName+.*) =
&&=20
!set (!transient (Object+ && !Serializable+) =
for.bar.SomeClassName.fieldToBeExcluded)) ||
...

Michael


"Michael Moser" <mmo@zurich.ibm.com> wrote in message =
news:cuqb7o$efh$1@www.eclipse.org...
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_0008_01C512AB.D25DFE10
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"">
<DIV><FONT face=3DArial size=3D2>OK, I finally found out: One has to=20
bracket&nbsp;(and repeat) the entire line:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><FONT =
face=3DCourier>&nbsp;&nbsp;...<BR>&nbsp; (set=20
(!transient (Object+ &amp;&amp; !Serializable+) =
for.bar.SomeClassName+.*)=20
&amp;&amp;&nbsp;<BR>&nbsp;&nbsp;!set&nbsp;(!transient (Object+ =
&amp;&amp;=20
!Serializable+) for.bar.SomeClassName.fieldToBeExcluded))=20
||<BR>&nbsp;&nbsp;...</FONT><BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Michael</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><BR></FONT>&nbsp;</DIV>
<DIV>"Michael Moser" &lt;<A=20
href=3D"mailto:mmo@zurich.ibm.com">mmo@zurich.ibm.com</A>&gt; wrote in =
message <A=20
href=3D"news:cuqb7o$efh$1@www.eclipse.org">news:cuqb7o$efh$1@www.eclipse.=
org</A>...</DIV><FONT=20
face=3DArial><FONT size=3D2>For my check for serializablity I want to =
exclude a=20
specific field: <BR><BR>The original part of the pointcut =
reads:<BR></FONT><FONT=20
size=3D2><FONT face=3DCourier>&nbsp;&nbsp;&nbsp; =
....<BR>&nbsp;&nbsp;&nbsp; set=20
(!transient (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_0008_01C512AB.D25DFE10--
Re: How to exclude a specific field from a pointcut? [message #586623 is a reply to message #47873] Mon, 14 February 2005 14:42 Go to previous message
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_0008_01C512AB.D25DFE10
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

OK, I finally found out: One has to bracket (and repeat) the entire =
line:

...
(set (!transient (Object+ && !Serializable+) for.bar.SomeClassName+.*) =
&&=20
!set (!transient (Object+ && !Serializable+) =
for.bar.SomeClassName.fieldToBeExcluded)) ||
...

Michael


"Michael Moser" <mmo@zurich.ibm.com> wrote in message =
news:cuqb7o$efh$1@www.eclipse.org...
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_0008_01C512AB.D25DFE10
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"">
<DIV><FONT face=3DArial size=3D2>OK, I finally found out: One has to=20
bracket&nbsp;(and repeat) the entire line:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><FONT =
face=3DCourier>&nbsp;&nbsp;...<BR>&nbsp; (set=20
(!transient (Object+ &amp;&amp; !Serializable+) =
for.bar.SomeClassName+.*)=20
&amp;&amp;&nbsp;<BR>&nbsp;&nbsp;!set&nbsp;(!transient (Object+ =
&amp;&amp;=20
!Serializable+) for.bar.SomeClassName.fieldToBeExcluded))=20
||<BR>&nbsp;&nbsp;...</FONT><BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Michael</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><BR></FONT>&nbsp;</DIV>
<DIV>"Michael Moser" &lt;<A=20
href=3D"mailto:mmo@zurich.ibm.com">mmo@zurich.ibm.com</A>&gt; wrote in =
message <A=20
href=3D"news:cuqb7o$efh$1@www.eclipse.org">news:cuqb7o$efh$1@www.eclipse.=
org</A>...</DIV><FONT=20
face=3DArial><FONT size=3D2>For my check for serializablity I want to =
exclude a=20
specific field: <BR><BR>The original part of the pointcut =
reads:<BR></FONT><FONT=20
size=3D2><FONT face=3DCourier>&nbsp;&nbsp;&nbsp; =
....<BR>&nbsp;&nbsp;&nbsp; set=20
(!transient (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_0008_01C512AB.D25DFE10--
Previous Topic:How to exclude a specific field from a pointcut?
Next Topic:compile warnings pile up...
Goto Forum:
  


Current Time: Fri Apr 19 04:58:54 GMT 2024

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

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

Back to the top