public static String getFieldType ( Field field ) { FieldType type = field . getType ( ) ; if ( type instanceof ScalarFieldType ) { ScalarFieldType scalarFieldType = ( ScalarFieldType ) type ; return ScalarFieldTypeUtil . getPrimitiveType ( scalarFieldType ) ; } if ( type instanceof UserType ) { UserType userType = ( UserType ) type ; return UserTypeUtil . getCanonicalName ( userType ) ; } throw new IllegalArgumentException ( field . toString ( ) ) ; }
Returns a java field type for proto field .