private void invokeFactoryMethod ( MethodDefinition read , Map < Short , LocalVariableDefinition > structData , LocalVariableDefinition instance ) { if ( metadata . getBuilderMethod ( ) . isPresent ( ) ) { ThriftMethodInjection builderMethod = metadata . getBuilderMethod ( ) . get ( ) ; read . loadVariable ( instance ) ; // push parameters on stack for ( ThriftParameterInjection parameter : builderMethod . getParameters ( ) ) { read . loadVariable ( structData . get ( parameter . getId ( ) ) ) ; } // invoke the method read . invokeVirtual ( builderMethod . getMethod ( ) ) . storeVariable ( instance ) ; } }
Defines the code that calls the builder factory method .