是否可以在 Android Studio 中复制变量并仅重构新变量的名称?

Is it possible to make a copy of variable and refactor only the name of new variable in Android Studio?

说我有

static final Map<..,..> MAP = new HashMap<>();
static 
{
MAP.put(..,..);
...
}

我想复制这个并将副本的名称重构为 MAP_2,这样我就会有一个这样的地图

static final Map<..,..> MAP_2 = new HashMap<>();
static 
{
MAP_2.put(..,..);
...
}

在同一个项目中。如果不在 Android Studio 中一一更改所有名称,这可能吗?

是的,这是可能的。
创建一个新的 class
将地图复制粘贴到新建 Class
重构