Summary: | private methods weaved into target classes result in mangled method names | ||
---|---|---|---|
Product: | [Tools] AspectJ | Reporter: | Shawn Shyh <sshyh> |
Component: | Compiler | Assignee: | aspectj inbox <aspectj-inbox> |
Status: | RESOLVED WONTFIX | QA Contact: | |
Severity: | critical | ||
Priority: | P3 | ||
Version: | 1.5.0M4 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Shawn Shyh
2005-11-17 14:44:08 EST
Sorry about that, committed prematurely. Let me finish the description: We're doing something like the following: aspect X { private writeObject(ObjectOutputStream out) { ... } } When you weave this into target classes, the name of the private methods is something like: "ajc$interMethodDispatch2 $com_wily_util_persistence_perst_PersistenceAspect$writeObject" This is clearly not recognized by the java serialization code as the writeObject method. Is there anyway to customize the mangling or to turn it off? -Shawn As discussed on the list, you could use Externalizable in this case? AspectJ has no plans to allow customization of its internal code generation strategies in the near future (quite probably ever). Also, a private ITD means private with respect to the aspect, not private with respect to the target type. I'm going to close this report out - the Java class library design in this area should be in a public hall of shame somewhere, but we're not going to do unnatural things to AspectJ to work around it! |