/** * Returns a java field getter name for proto repeated field. */ public static String getRepeatedFieldGetterName(Field field) { if (field.isRepeated()) { return GETTER_PREFIX + Formatter.toPascalCase(field.getName()) + GETTER_REPEATED_SUFFIX; } throw new IllegalArgumentException(field.toString()); }
/** * Returns a field setter name for proto repeated field. */ public static String getRepeatedFieldSetterName(Field field) { if (field.isRepeated()) { return SETTER_PREFIX + Formatter.toPascalCase(field.getName()); } throw new IllegalArgumentException(field.toString()); }
/** * Returns a element count getter name for proto repeated field. */ public static String repeatedGetCountMethodName(Field field) { if (field.isRepeated()) { return GETTER_PREFIX + Formatter.toPascalCase(field.getName()) + "Count"; } throw new IllegalArgumentException(field.toString()); }
/** * Returns a java field getter name for proto repeated field. */ public static String getRepeatedFieldGetterName(Field field) { if (field.isRepeated()) { return GETTER_PREFIX + Formatter.toPascalCase(field.getName()) + GETTER_REPEATED_SUFFIX; } throw new IllegalArgumentException(field.toString()); }
/** * Returns a field getter by index name for proto repeated field. */ public static String repeatedGetByIndexMethodName(Field field) { if (field.isRepeated()) { return GETTER_PREFIX + Formatter.toPascalCase(field.getName()); } throw new IllegalArgumentException(field.toString()); }
/** * Returns a field converter class name for proto repeated enum field. */ public static String getRepeatedEnumConverterName(Field field) { if (field.isRepeated()) { return "__" + Formatter.toCamelCase(field.getName()) + "Converter"; } throw new IllegalArgumentException(field.toString()); }
/** * Returns a field value setter name for proto repeated enum field. */ public static String getRepeatedEnumValueSetterName(Field field) { if (field.isRepeated()) { return SETTER_PREFIX + Formatter.toPascalCase(field.getName()) + VALUE; } throw new IllegalArgumentException(field.toString()); }
/** * Returns a element count getter name for proto repeated field. */ public static String repeatedGetCountMethodName(Field field) { if (field.isRepeated()) { return GETTER_PREFIX + Formatter.toPascalCase(field.getName()) + "Count"; } throw new IllegalArgumentException(field.toString()); }
/** * Returns map field setter name. */ public static String getMapSetterName(Field field) { if (field.isMap()) { return SETTER_PREFIX + Formatter.toPascalCase(field.getName()) + MAP_SUFFIX; } throw new IllegalArgumentException(field.toString()); }
/** * Returns a field getter by index name for proto repeated field. */ public static String repeatedGetByIndexMethodName(Field field) { if (field.isRepeated()) { return GETTER_PREFIX + Formatter.toPascalCase(field.getName()); } throw new IllegalArgumentException(field.toString()); }
/** * Returns map field getter for particular key method name. */ public static String mapGetByKeyMethodName(Field field) { if (field.isMap()) { return GETTER_PREFIX + Formatter.toPascalCase(field.getName()); } throw new IllegalArgumentException(field.toString()); }
/** * Returns "putAll" method name for map field. */ public static String getMapFieldAddAllName(Field field) { if (field.isMap()) { return "putAll" + Formatter.toPascalCase(field.getName()); } throw new IllegalArgumentException(field.toString()); }
/** * Returns a field value getter name for proto repeated enum field. */ public static String getRepeatedEnumFieldValueGetterName(Field field) { if (field.isRepeated()) { return GETTER_PREFIX + Formatter.toPascalCase(field.getName()) + "ValueList"; } throw new IllegalArgumentException(field.toString()); }
/** * Returns map field getter name. */ public static String getMapGetterName(Field field) { if (field.isMap()) { return GETTER_PREFIX + Formatter.toPascalCase(field.getName()) + MAP_SUFFIX; } throw new IllegalArgumentException(field.toString()); }
/** * Returns map field setter name. */ public static String getMapSetterName(Field field) { if (field.isMap()) { return SETTER_PREFIX + Formatter.toPascalCase(field.getName()) + MAP_SUFFIX; } throw new IllegalArgumentException(field.toString()); }
/** * Returns map field "put" method name. */ public static String getMapFieldAdderName(Field field) { if (field.isMap()) { return PUT_PREFIX + Formatter.toPascalCase(field.getName()); } throw new IllegalArgumentException(field.toString()); }
/** * Returns a field setter name for proto repeated field. */ public static String getRepeatedFieldSetterName(Field field) { if (field.isRepeated()) { return SETTER_PREFIX + Formatter.toPascalCase(field.getName()); } throw new IllegalArgumentException(field.toString()); }
/** * Returns map field getter name. */ public static String getMapGetterName(Field field) { if (field.isMap()) { return GETTER_PREFIX + Formatter.toPascalCase(field.getName()) + MAP_SUFFIX; } throw new IllegalArgumentException(field.toString()); }
/** * Returns "putAll" method name for map field. */ public static String getMapFieldAddAllName(Field field) { if (field.isMap()) { return "putAll" + Formatter.toPascalCase(field.getName()); } throw new IllegalArgumentException(field.toString()); }
/** * Returns map field "put" method name. */ public static String getMapFieldAdderName(Field field) { if (field.isMap()) { return PUT_PREFIX + Formatter.toPascalCase(field.getName()); } throw new IllegalArgumentException(field.toString()); }