public static SoyValue applyPrintDirective ( SoyJavaPrintDirective directive , SoyValue value , List < SoyValue > args ) { value = value == null ? NullData . INSTANCE : value ; for ( int i = 0 ; i < args . size ( ) ; i ++ ) { if ( args . get ( i ) == null ) { args . set ( i , NullData . INSTANCE ) ; } } return directive . applyForJava ( value , args ) ; }
Helper function to translate null - > NullData when calling SoyJavaPrintDirectives that may expect it .