question: protected static String escapeDot ( String identifierToEscape ) { int indexof = identifierToEscape . indexOf ( "." ) ; if ( indexof == - 1 ) { return identifierToEscape ; } StringBuilder builder = new StringBuilder ( ) ; for ( int i = 0 ; i < identifierToEscape . length ( ) ; i ++ ) { char c = identifierToEscape . charAt ( i ) ; if ( c != '.' ) { builder . append ( c ) ; continue ; } if ( i > 0 ) { if ( identifierToEscape . charAt ( i - 1 ) == '\\' ) { builder . append ( '.' ) ; continue ; } } builder . append ( '\\' ) ; builder . append ( '.' ) ; } return builder . toString ( ) ; }
target:  Escape all unescape dot characters in the text (identifier only) passed in.