public static String getFieldName ( Descriptors . FieldDescriptor field , boolean capitializeFirstLetter ) { String fieldName = field . getName ( ) ; if ( SPECIAL_CASES . containsKey ( fieldName ) ) { String output = SPECIAL_CASES . get ( fieldName ) ; if ( capitializeFirstLetter ) { return output ; } else { return ( ( char ) ( output . charAt ( 0 ) + ( ' ' - ' ' ) ) ) + output . substring ( 1 ) ; } } return underscoresToCamelCase ( fieldName , capitializeFirstLetter ) ; }
Returns the Java name for a proto field .