public J visitMethodInvocation()

in v2-migration/src/main/java/software/amazon/awssdk/v2migration/S3PutObjectRequestToV2.java [94:138]


        public J visitMethodInvocation(J.MethodInvocation method, ExecutionContext ctx) {
            if (isObjectMetadataSetter(method)) {
                return saveMetadataValueAndRemoveStatement(method);
            }

            if (isPutObjectRequestBuilderSetter(method)) {
                if (isRequestMetadataSetter(method)) {
                    method = (J.MethodInvocation) super.visitMethodInvocation(method, ctx);
                    return transformWithMetadata(method);
                }
                if (isPayloadSetter(method)) {
                    return transformRequestBuilderPayloadSetter(method);
                }
                if (isRequestPayerSetter(method)) {
                    return transformWithRequesterPays(method);
                }
                if (isUnsupportedPutObjectRequestSetter(method)) {
                    method = addCommentForUnsupportedPutObjectRequestSetter(method);
                    return super.visitMethodInvocation(method, ctx);
                }
            }
            if (isPutObjectRequestSetter(method)) {
                if (isRequestMetadataSetter(method)) {
                    return convertSetMetadataToBuilder(method);
                }
                if (isPayloadSetter(method)) {
                    return transformRequestPayloadSetter(method);
                }
            }

            if (PUT_OBJECT_STREAM_METADATA.matches(method)) {
                method = (J.MethodInvocation) super.visitMethodInvocation(method, ctx);
                return transformPutObjectWithStreamAndMetadata(method);
            }
            if (PUT_OBJ_WITH_REQUEST.matches(method)) {
                method = (J.MethodInvocation) super.visitMethodInvocation(method, ctx);
                return transformPutObjectWithRequest(method);
            }
            if (UPLOAD_WITH_REQUEST.matches(method)) {
                method = (J.MethodInvocation) super.visitMethodInvocation(method, ctx);
                return transformUploadWithRequest(method);
            }

            return super.visitMethodInvocation(method, ctx);
        }