public static String determineMutatorName ( @ Nonnull final String fieldName ) { Check . notEmpty ( fieldName , "fieldName" ) ; final Matcher m = PATTERN . matcher ( fieldName ) ; Check . stateIsTrue ( m . find ( ) , "passed field name '%s' is not applicable" , fieldName ) ; final String name = m . group ( ) ; return METHOD_SET_PREFIX + name . substring ( 0 , 1 ) . toUpperCase ( ) + name . substring ( 1 ) ; }
Determines the mutator method name based on a field name .