@Nullable
 public PsiMethod getValuesMethod() {
   return !myClass.isEnum() || myClass.getName() == null
       ? null
       : CachedValuesManager.getCachedValue(
           myClass,
           new CachedValueProvider<PsiMethod>() {
             @Nullable
             @Override
             public Result<PsiMethod> compute() {
               String text = "public static " + myClass.getName() + "[] values() { }";
               return new Result<PsiMethod>(
                   getSyntheticMethod(text), OUT_OF_CODE_BLOCK_MODIFICATION_COUNT, myTracker);
             }
           });
 }
 @Nullable
 public PsiMethod getValueOfMethod() {
   return !myClass.isEnum() || myClass.getName() == null
       ? null
       : CachedValuesManager.getCachedValue(
           myClass,
           new CachedValueProvider<PsiMethod>() {
             @Nullable
             @Override
             public Result<PsiMethod> compute() {
               String text =
                   "public static "
                       + myClass.getName()
                       + " valueOf(java.lang.String name) throws java.lang.IllegalArgumentException { }";
               return new Result<PsiMethod>(
                   getSyntheticMethod(text), OUT_OF_CODE_BLOCK_MODIFICATION_COUNT, myTracker);
             }
           });
 }