src/main/java/ca/jeb/protobuf/internal/ProtobufSerializerUtils.java
public static final String getProtobufGetter(ProtobufAttribute protobufAttribute, Field field)
  {
    final String fieldName = field.getName();
    final String upperClassName = field.getDeclaringClass().getCanonicalName();
    // Look at the cache first
    Map<String, String> map = CLASS_TO_FIELD_GETTERS_MAP_CACHE.get(upperClassName);
    if (map != null)
    {
      if (!map.isEmpty() && map.containsKey(fieldName))
      {
        return map.get(fieldName);
      }
    }
    else
    {
      map = new ConcurrentHashMap<>();
    }

    final String upperCaseFirstFieldName = JStringUtils.upperCaseFirst(field.getName());
    String getter = "get" + upperCaseFirstFieldName;

    if (Collection.class.isAssignableFrom(field.getType()))
    {
      getter += "List";
    }
    if (!protobufAttribute.protobufGetter().isEmpty())
    {
      return protobufAttribute.protobufGetter();
    }

    map.put(fieldName, getter);
    CLASS_TO_FIELD_GETTERS_MAP_CACHE.put(upperClassName, map);

    return getter;
  }
public static final String getProtobufGetter(ProtobufAttribute protobufAttribute, Field field)
  {
    final String fieldName = field.getName();
    final String upperClassName = field.getDeclaringClass().getCanonicalName();
    // Look at the cache first
    Map<String, String> map = CLASS_TO_FIELD_GETTERS_MAP_CACHE.get(upperClassName);
    if (map != null)
    {
      if (!map.isEmpty() && map.containsKey(fieldName))
      {
        return map.get(fieldName);
      }
    }
    else
    {
      map = new ConcurrentHashMap<>();
    }

    final String upperCaseFirstFieldName = JStringUtils.upperCaseFirst(field.getName());
    String getter = "get" + upperCaseFirstFieldName;

    if (Collection.class.isAssignableFrom(field.getType()))
    {
      getter += "List";
    }
    if (!protobufAttribute.protobufGetter().isEmpty())
    {
      return protobufAttribute.protobufGetter();
    }

    map.put(fieldName, getter);
    CLASS_TO_FIELD_GETTERS_MAP_CACHE.put(upperClassName, map);

    return getter;
  }
public static final String getProtobufGetter ( ProtobufAttribute protobufAttribute , Field field ) { final String fieldName = field . getName ( ) ; final String upperClassName = field . getDeclaringClass ( ) . getCanonicalName ( ) ; // Look at the cache first Map < String , String > map = CLASS_TO_FIELD_GETTERS_MAP_CACHE . get ( upperClassName ) ; if ( map != null ) { if ( ! map . isEmpty ( ) && map . containsKey ( fieldName ) ) { return map . get ( fieldName ) ; } } else { map = new ConcurrentHashMap <> ( ) ; } final String upperCaseFirstFieldName = JStringUtils . upperCaseFirst ( field . getName ( ) ) ; String getter = "get" + upperCaseFirstFieldName ; if ( Collection . class . isAssignableFrom ( field . getType ( ) ) ) { getter += "List" ; } if ( ! protobufAttribute . protobufGetter ( ) . isEmpty ( ) ) { return protobufAttribute . protobufGetter ( ) ; } map . put ( fieldName , getter ) ; CLASS_TO_FIELD_GETTERS_MAP_CACHE . put ( upperClassName , map ) ; return getter ; }
Retrieve the getter against the Protobuf class; default is to is "get" plus upper case first character of the field name.

@param protobufAttribute - {@link ProtobufAttribute}
@param field - {@link Field}
@return String
Retrieve the getter against the Protobuf class ; default is to is get plus upper case first character of the field name .