我有几个可以通过int找到的枚举。这是通过枚举上的静态方法完成的。例如:enumFoo{A,B,C,D,...;publicstaticFoofromInt(inti){switch(i){case15:returnA;case42:returnB;...}}enumBar{BLA,BOO,BEE,...;publicstaticBarfromInt(inti){switch(i){case78:returnBLA;case22:returnBOO;...}}...现在在一些代码中,我有一个泛型类型T,它保证是这些枚举之一,我有一个整数i。如何调用fromInt方法并通过值i获取枚举实