sed script
we provide.
The exception is that the size method
isn't automatically converted to getSize.
We decided not to do this particular conversion
because the commonly used Vector class
still has a frequently used method named size.
sed script can't tell
what type of object it's affecting,
you might find it making incorrect changes,
which you'll generally discover when you see
compilation error messages
such as the following:
When you see such an error message, check whether the script incorrectly changed a method name. Looking at the table below, you can see the method's original name. The solution is to edit the program by hand -- changing the error-causing lines to use the old name. For example, for the error message above you would changeCardWindow.java:40: Method setVisible(java.awt.Panel, java.lang.String) not found in class java.awt.CardLayout. ((CardLayout)cards.getLayout()).setVisible(cards,(String)arg);
setVisible
to
show on line 40 of the CardWindow.java file.
| Old Method Name | 1.1 Method Name |
|---|---|
addItem
| add
|
appendText
| append
|
inside
| contains
|
layout
| doLayout
|
getPageIncrement
| getBlockIncrement
|
boundsgetBoundingBox
| getBounds
|
getClipRect
| getClipBounds
|
locate
| getComponentAt
|
countComponents
| getComponentCount
|
insets
| getInsets
|
countItems
| getItemCount
|
location
| getLocation
|
countMenus
| getMenuCount
|
minimumSize
| getMinimumSize
|
preferredSize
| getPreferredSize
|
getCurrent
| getSelectedCheckbox
|
size
| getSize
This change is not performed by the script. |
getLineIncrement
| getUnitIncrement
|
getVisible
| getVisibleAmount
|
insertText
| insert
|
isSelected
| isIndexSelected
|
allowsMultipleSelections
| isMultipleMode
|
delItem
| remove
|
clear
| removeAll
|
replaceText
| replaceRange
|
setPageIncrement
| setBlockIncrement
|
reshape
| setBounds
|
setEchoCharacter
| setEchoChar
|
disable
| setEnabled(false)
|
enable
| setEnabled(true)
|
enable(expression)
| setEnabled(expression)
|
move
| setLocation
|
setMultipleSelections
| setMultipleMode
|
setCurrent
| setSelectedCheckbox
|
resize
| setSize
|
setLineIncrement
| setUnitIncrement
|
hide
| setVisible(false)
|
show()
| setVisible(true)
|
show(expression)
| setVisible(expression)
|
nextFocus
| transferFocus
|