Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 26876 - Bytecode patching that allows to rename a member
Bytecode patching that allows to rename a member
Product: platform
Classification: Unclassified
Component: Module System
PC Linux
: P2 (vote)
: 3.x
Assigned To: Jesse Glick
Depends on:
Blocks: 26790
  Show dependency treegraph
Reported: 2002-08-29 13:32 UTC by Jaroslav Tulach
Modified: 2008-12-23 08:37 UTC (History)
0 users

See Also:
Issue Type: TASK

Patching with ability to rename members (32.42 KB, patch)
2002-08-29 13:33 UTC, Jaroslav Tulach
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2002-08-29 13:32:12 UTC
While working on issue 26790 I realized that it
would be very useful if the bytecode patching
could handle rename of methods (and fields).
Something like the old postprocessing task that
changed r3fr3shRoot to refreshRoot so there could
be two methods with different return type.

In the current system this was handled by moving
of one of the methods into a superclass
($SystemAction$Patch$.getIcon for example), but
the problem is that this does not work for static
methods and also, that even the generated patched
version of SystemAction (with $SA$Patch$
superclass) cannot be subclassed by someone who
overrides the old method (ImageIcon getIcon).

For this reason I decided to enhance the patching
system to be able to rename members during runtime.
Comment 1 Jaroslav Tulach 2002-08-29 13:33:01 UTC
Created attachment 7250 [details]
Patching with ability to rename members
Comment 2 Jaroslav Tulach 2002-08-29 13:36:39 UTC
The patch does not look too complicated. Actually I just copied method
markMemberPublic into renameMember and mangle it a bit, moreover the
rename ability allowed me to delete two fake superclasses.
$AbstractFileSystem$Patch$ and $SystemAction$Patch$

All tests seem to work, but remembering all the problems that you
(Jesse) found last time, it is definitivelly better to wait for your

Can you review & apply or review & give me permision to apply?
Comment 3 Jesse Glick 2002-08-30 02:44:15 UTC
Will apply this.
Comment 4 Jesse Glick 2002-08-30 02:58:48 UTC

committed   * Up-To-Date  1.9        
committed   * Up-To-Date  1.7        
committed   * Up-To-Date  1.3        
committed   * Up-To-Date  1.111       openide/build.xml
removed     * Up-To-Date  1.3        
removed     * Up-To-Date  1.2        
committed   * Up-To-Date  1.48       
committed   * Up-To-Date  1.60       

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo