以下是我的助手提供者类
public class HP<T> implements javax.inject.Provider<T> {
private static Map<KEY, Object> helperMap = new HashMap<>();
public static void setHelper(KEY helper, Object helperObject) {
helperMap.put(helper, helperObject);
}
public static enum KEY {
POLICY_HELPER, MILES_HELPER;
}
}
我正在初始化地图
class AAAA{
static {
initHelperProviderMap();
}
private static void initHelperProviderMap() {
HP.KEY. **//Unable to access enum KEY's key POLICY_HELPER etc**
HP.setHelper(HP.KEY.??, helperObject);
}
这里HP.KEY.POLICY_HELPER是我无法访问的。你能建议任何解决方案吗?