[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [aspectj-users] disabling name mangling in private methods
|
Hey Dean,
The aspect I'm using is defined as the following:
privileged public aspect PersistenceAspect
{
private IAutoPersist.writeObject(ObjectOutputStream out)
{
...
}
}
So I'm attempting to add a private writeObject method to all
IAutoPersist objects. When it's weaved in, the writeObject method name
is mangled into:
ajc$interMethodDispatch2$com_wily_util_persistence_perst_PersistenceAspe
ct$writeObject
This mangled name prevents Java serialization from recognizing the
writeObject method impl.
-Shawn
-----Original Message-----
From: aspectj-users-bounces@xxxxxxxxxxx
[mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Dean Wampler
Sent: Thursday, November 17, 2005 12:31 PM
To: aspectj-users@xxxxxxxxxxx
Subject: Re: [aspectj-users] disabling name mangling in private methods
Declaring your aspect as "privileged" allows it to see private
methods, in their human-readable form. Would that meet your needs?
dean
On 11/17/05, Shawn Shyh <sshyh@xxxxxxxxxxxx> wrote:
>
>
>
> Hey,
>
>
>
> I was wondering if anyone know of a way to get around method name
mangling
> for private methods.
>
> I'd like to weave in a custom writeObject() method for handling java
> serialization into my target classes.
>
> Java requires the writeObject() method to be declared private, but
> unfortunately, the aspectJ compiler always mangles private method name
> (presumably to prevent name collisions).
>
>
>
> Is there a way to turn this mangling off or possibly customize it
somehow?
>
>
>
> -Shawn
>
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>
>
--
Dean Wampler
http://www.aspectprogramming.com
http://www.newaspects.com
http://www.contract4j.org
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users