diff --git a/src/main/java/org/apache/ibatis/binding/MapperMethodInvoker.java b/src/main/java/org/apache/ibatis/binding/MapperMethodInvoker.java new file mode 100644 index 00000000000..1b88662e6d4 --- /dev/null +++ b/src/main/java/org/apache/ibatis/binding/MapperMethodInvoker.java @@ -0,0 +1,26 @@ +/* + * Copyright 2009-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.ibatis.binding; + +import java.lang.reflect.Method; + +import org.apache.ibatis.session.SqlSession; + +public interface MapperMethodInvoker { + + Object invoke(Object proxy, Method method, Object[] args, SqlSession sqlSession) throws Throwable; + +} diff --git a/src/main/java/org/apache/ibatis/binding/MapperProxy.java b/src/main/java/org/apache/ibatis/binding/MapperProxy.java index 4f3399199b8..16cecff7bd4 100644 --- a/src/main/java/org/apache/ibatis/binding/MapperProxy.java +++ b/src/main/java/org/apache/ibatis/binding/MapperProxy.java @@ -93,10 +93,6 @@ private MethodHandle getMethodHandleJava9(Method method) declaringClass); } - interface MapperMethodInvoker { - Object invoke(Object proxy, Method method, Object[] args, SqlSession sqlSession) throws Throwable; - } - private static class PlainMethodInvoker implements MapperMethodInvoker { private final MapperMethod mapperMethod; diff --git a/src/main/java/org/apache/ibatis/binding/MapperProxyFactory.java b/src/main/java/org/apache/ibatis/binding/MapperProxyFactory.java index a4526458dd0..b9d932c37c1 100644 --- a/src/main/java/org/apache/ibatis/binding/MapperProxyFactory.java +++ b/src/main/java/org/apache/ibatis/binding/MapperProxyFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2009-2022 the original author or authors. + * Copyright 2009-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,6 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; -import org.apache.ibatis.binding.MapperProxy.MapperMethodInvoker; import org.apache.ibatis.session.SqlSession; /** diff --git a/src/test/java/org/apache/ibatis/binding/BindingTest.java b/src/test/java/org/apache/ibatis/binding/BindingTest.java index c441868c63c..c53a0a38a17 100644 --- a/src/test/java/org/apache/ibatis/binding/BindingTest.java +++ b/src/test/java/org/apache/ibatis/binding/BindingTest.java @@ -45,7 +45,6 @@ import net.sf.cglib.proxy.Factory; import org.apache.ibatis.BaseDataTest; -import org.apache.ibatis.binding.MapperProxy.MapperMethodInvoker; import org.apache.ibatis.cursor.Cursor; import org.apache.ibatis.domain.blog.Author; import org.apache.ibatis.domain.blog.Blog;