I'm in trouble with refactorring the element type of generics, please check the image below,
The type of element is "String", and now I want to refactor it to "Integer", how should I do in eclipse. I DO NOT want to change the type of "titleName" !! . I've checked that if I select the type name and right-click, there is no "Rename" in the context menu :-(
I refactorred the type with the "help/replace" as a workaround, however, I don't think this is a good way, it may cause typos.
well, I know my question is a bit little weird, but I think lots of guys may encoutered. For instance, how to change "Map<String,Integer> map = HashMap<String, Integer>()" to "Map<Integer,User> map = HashMap<Integer, User>()"
?
CTRL + F
FIND: <String>
REPLACE WITH: <Integer>
Replace All
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.