protected final void buildCommonPropertyParameters ( CodeBlock . Builder paramBuilder , PropertyInfo property ) { if ( property . getFormat ( ) . isPresent ( ) ) { JsonFormat format = property . getFormat ( ) . get ( ) ; if ( ! Strings . isNullOrEmpty ( format . pattern ( ) ) ) { paramBuilder . add ( "\n.setPattern($S)" , format . pattern ( ) ) ; } paramBuilder . add ( "\n.setShape($T.$L)" , Shape . class , format . shape ( ) . name ( ) ) ; if ( ! Strings . isNullOrEmpty ( format . locale ( ) ) && ! JsonFormat . DEFAULT_LOCALE . equals ( format . locale ( ) ) ) { logger . log ( Type . WARN , "JsonFormat.locale is not supported by default" ) ; paramBuilder . add ( "\n.setLocale($S)" , format . locale ( ) ) ; } } if ( property . getIgnoredProperties ( ) . isPresent ( ) ) { for ( String ignoredProperty : property . getIgnoredProperties ( ) . get ( ) ) { paramBuilder . add ( "\n.addIgnoredProperty($S)" , ignoredProperty ) ; } } }
Add the common property parameters to the code builder .