code: private void buildPluralMethod(
        TypeSpec.Builder type, String pluralType, Map<String, PluralData> pluralMap, Map<String, FieldSpec> fieldMap) {
  
      MethodSpec.Builder method = MethodSpec.methodBuilder("eval" + pluralType)
          .addModifiers(PUBLIC)
          .addParameter(String.class, "language")
          .addParameter(NUMBER_OPERANDS, "o")
          .returns(PLURAL_CATEGORY);
  
      method.beginControlFlow("switch (language)");
  
      List<MethodSpec> ruleMethods = new ArrayList<>();
      for (Map.Entry<String, PluralData> entry : pluralMap.entrySet()) {
        String language = entry.getKey();
        String methodName = String.format("eval%s%s", pluralType, language.toUpperCase());
        method.addStatement("case $S:\n  return $L(o)", language, methodName);
  
        MethodSpec ruleMethod = buildRuleMethod(methodName, entry.getValue(), fieldMap);
        ruleMethods.add(ruleMethod);
      }
  
      method.addStatement("default:\n  return null");
  
      method.endControlFlow();
      type.addMethod(method.build());
  
      for (MethodSpec ruleMethod : ruleMethods) {
        type.addMethod(ruleMethod);
      }
    }
docs: Creates a method to evaluate the plural rules for a specific language and plural type
  (cardinal, ordinal).