我有一个带有嵌套枚举的枚举(我想将其设为私有(private)),但是当我这样做时,GWT告诉我嵌套枚举不可见并抛出异常。publicenumOuterEnum{A(NestedEnum.X),B(NestedEnum.Y),C(NestedEnum.X);NestedEnumnestedValue;privateOuterEnum(NestedEnumnv){nestedValue=nv;}privateenumNestedEnum{X,Y;}}如果我从嵌套的枚举中删除private修饰符,那么代码就可以工作了。为什么GWT不允许嵌套枚举使用private修饰符?有解决方法吗?
给定一个包含枚举的类:publicclassMyClass{publicenumNestedEnum{value1(1),value2(2);privateintcode;privateNestedEnum(intcode){this.code=code;}publicintgetCode(){returncode;}}}如何引用NestedEnum?这个:#{T(MyClass.NestedEnum).value1.getCode()}导致异常:org.springframework.expression.spel.SpelEvaluationException:EL1005E:(p
给定一个包含枚举的类:publicclassMyClass{publicenumNestedEnum{value1(1),value2(2);privateintcode;privateNestedEnum(intcode){this.code=code;}publicintgetCode(){returncode;}}}如何引用NestedEnum?这个:#{T(MyClass.NestedEnum).value1.getCode()}导致异常:org.springframework.expression.spel.SpelEvaluationException:EL1005E:(p