public MethodHandle invoke ( MethodHandle target ) { MethodHandle current = target ; for ( Transform t : transforms ) { current = t . up ( current ) ; } // if resulting handle's type does not match start, attempt one more cast current = MethodHandles . explicitCastArguments ( current , start ) ; return current ; }
Apply the chain of transforms with the target method handle as the final endpoint . Produces a handle that has the transforms in given sequence .