private void generateGetStaticRenderFunctions ( ComponentExposedTypeGenerator exposedTypeGenerator , VueTemplateCompilerResult result ) { CodeBlock . Builder staticFunctions = CodeBlock . builder ( ) ; boolean isFirst = true ; for ( String staticRenderFunction : result . getStaticRenderFunctions ( ) ) { if ( ! isFirst ) { staticFunctions . add ( ", " ) ; } else { isFirst = false ; } staticFunctions . add ( "new $T($S)" , Function . class , staticRenderFunction ) ; } MethodSpec . Builder getStaticRenderFunctionsBuilder = MethodSpec . methodBuilder ( "getStaticRenderFunctions" ) . addModifiers ( Modifier . PRIVATE ) . returns ( Function [ ] . class ) . addStatement ( "return new $T[] { $L }" , Function . class , staticFunctions . build ( ) ) ; exposedTypeGenerator . getClassBuilder ( ) . addMethod ( getStaticRenderFunctionsBuilder . build ( ) ) ; }
Generate the method that returns the body of the static render functions .