diff --git a/hutool-core/src/main/java/org/dromara/hutool/core/annotation/AnnotationMappingProxy.java b/hutool-core/src/main/java/org/dromara/hutool/core/annotation/AnnotationMappingProxy.java index 3c5600975..66c3042f3 100644 --- a/hutool-core/src/main/java/org/dromara/hutool/core/annotation/AnnotationMappingProxy.java +++ b/hutool-core/src/main/java/org/dromara/hutool/core/annotation/AnnotationMappingProxy.java @@ -13,7 +13,7 @@ package org.dromara.hutool.core.annotation; import org.dromara.hutool.core.map.SafeConcurrentHashMap; -import org.dromara.hutool.core.reflect.MethodUtil; +import org.dromara.hutool.core.reflect.method.MethodUtil; import org.dromara.hutool.core.text.CharSequenceUtil; import java.lang.annotation.Annotation; diff --git a/hutool-core/src/main/java/org/dromara/hutool/core/annotation/AnnotationProxy.java b/hutool-core/src/main/java/org/dromara/hutool/core/annotation/AnnotationProxy.java index 55632ae9c..8c8447dc4 100644 --- a/hutool-core/src/main/java/org/dromara/hutool/core/annotation/AnnotationProxy.java +++ b/hutool-core/src/main/java/org/dromara/hutool/core/annotation/AnnotationProxy.java @@ -12,7 +12,7 @@ package org.dromara.hutool.core.annotation; -import org.dromara.hutool.core.reflect.MethodUtil; +import org.dromara.hutool.core.reflect.method.MethodUtil; import org.dromara.hutool.core.text.StrUtil; import java.io.Serializable; diff --git a/hutool-core/src/main/java/org/dromara/hutool/core/annotation/AnnotationUtil.java b/hutool-core/src/main/java/org/dromara/hutool/core/annotation/AnnotationUtil.java index 0e49f24c2..db533acce 100644 --- a/hutool-core/src/main/java/org/dromara/hutool/core/annotation/AnnotationUtil.java +++ b/hutool-core/src/main/java/org/dromara/hutool/core/annotation/AnnotationUtil.java @@ -20,7 +20,7 @@ import org.dromara.hutool.core.func.LambdaUtil; import org.dromara.hutool.core.func.SerFunction; import org.dromara.hutool.core.map.WeakConcurrentMap; import org.dromara.hutool.core.reflect.FieldUtil; -import org.dromara.hutool.core.reflect.MethodUtil; +import org.dromara.hutool.core.reflect.method.MethodUtil; import org.dromara.hutool.core.text.CharSequenceUtil; import org.dromara.hutool.core.text.StrUtil; import org.dromara.hutool.core.util.ObjUtil; diff --git a/hutool-core/src/main/java/org/dromara/hutool/core/annotation/GenericAnnotationMapping.java b/hutool-core/src/main/java/org/dromara/hutool/core/annotation/GenericAnnotationMapping.java index ee1d1916b..2b01a2b57 100644 --- a/hutool-core/src/main/java/org/dromara/hutool/core/annotation/GenericAnnotationMapping.java +++ b/hutool-core/src/main/java/org/dromara/hutool/core/annotation/GenericAnnotationMapping.java @@ -13,7 +13,7 @@ package org.dromara.hutool.core.annotation; import org.dromara.hutool.core.reflect.ClassUtil; -import org.dromara.hutool.core.reflect.MethodUtil; +import org.dromara.hutool.core.reflect.method.MethodUtil; import org.dromara.hutool.core.text.CharSequenceUtil; import java.lang.annotation.Annotation; diff --git a/hutool-core/src/main/java/org/dromara/hutool/core/annotation/HierarchicalAnnotatedElements.java b/hutool-core/src/main/java/org/dromara/hutool/core/annotation/HierarchicalAnnotatedElements.java index 52f126721..3f0afcdc9 100644 --- a/hutool-core/src/main/java/org/dromara/hutool/core/annotation/HierarchicalAnnotatedElements.java +++ b/hutool-core/src/main/java/org/dromara/hutool/core/annotation/HierarchicalAnnotatedElements.java @@ -14,7 +14,7 @@ package org.dromara.hutool.core.annotation; import org.dromara.hutool.core.collection.CollUtil; import org.dromara.hutool.core.reflect.ClassUtil; -import org.dromara.hutool.core.reflect.MethodUtil; +import org.dromara.hutool.core.reflect.method.MethodUtil; import org.dromara.hutool.core.text.CharSequenceUtil; import org.dromara.hutool.core.array.ArrayUtil; diff --git a/hutool-core/src/main/java/org/dromara/hutool/core/annotation/RepeatableAnnotationCollector.java b/hutool-core/src/main/java/org/dromara/hutool/core/annotation/RepeatableAnnotationCollector.java index 09d08b635..79022f330 100644 --- a/hutool-core/src/main/java/org/dromara/hutool/core/annotation/RepeatableAnnotationCollector.java +++ b/hutool-core/src/main/java/org/dromara/hutool/core/annotation/RepeatableAnnotationCollector.java @@ -15,7 +15,7 @@ package org.dromara.hutool.core.annotation; import org.dromara.hutool.core.array.ArrayUtil; import org.dromara.hutool.core.collection.CollUtil; import org.dromara.hutool.core.map.WeakConcurrentMap; -import org.dromara.hutool.core.reflect.MethodUtil; +import org.dromara.hutool.core.reflect.method.MethodUtil; import org.dromara.hutool.core.text.CharSequenceUtil; import java.lang.annotation.Annotation; diff --git a/hutool-core/src/main/java/org/dromara/hutool/core/annotation/ResolvedAnnotationMapping.java b/hutool-core/src/main/java/org/dromara/hutool/core/annotation/ResolvedAnnotationMapping.java index 5d7324ea4..f13b430c1 100644 --- a/hutool-core/src/main/java/org/dromara/hutool/core/annotation/ResolvedAnnotationMapping.java +++ b/hutool-core/src/main/java/org/dromara/hutool/core/annotation/ResolvedAnnotationMapping.java @@ -16,7 +16,7 @@ import org.dromara.hutool.core.collection.CollUtil; import org.dromara.hutool.core.lang.Assert; import org.dromara.hutool.core.map.multi.Graph; import org.dromara.hutool.core.reflect.ClassUtil; -import org.dromara.hutool.core.reflect.MethodUtil; +import org.dromara.hutool.core.reflect.method.MethodUtil; import org.dromara.hutool.core.text.CharSequenceUtil; import org.dromara.hutool.core.array.ArrayUtil; diff --git a/hutool-core/src/main/java/org/dromara/hutool/core/bean/BeanDesc.java b/hutool-core/src/main/java/org/dromara/hutool/core/bean/BeanDesc.java index 3a606bc41..15e7e5538 100644 --- a/hutool-core/src/main/java/org/dromara/hutool/core/bean/BeanDesc.java +++ b/hutool-core/src/main/java/org/dromara/hutool/core/bean/BeanDesc.java @@ -16,7 +16,7 @@ import org.dromara.hutool.core.array.ArrayUtil; import org.dromara.hutool.core.lang.Assert; import org.dromara.hutool.core.map.CaseInsensitiveMap; import org.dromara.hutool.core.reflect.FieldUtil; -import org.dromara.hutool.core.reflect.MethodUtil; +import org.dromara.hutool.core.reflect.method.MethodUtil; import org.dromara.hutool.core.reflect.ModifierUtil; import org.dromara.hutool.core.text.StrUtil; import org.dromara.hutool.core.util.BooleanUtil; diff --git a/hutool-core/src/main/java/org/dromara/hutool/core/bean/DynaBean.java b/hutool-core/src/main/java/org/dromara/hutool/core/bean/DynaBean.java index 045c0590f..e946bed63 100644 --- a/hutool-core/src/main/java/org/dromara/hutool/core/bean/DynaBean.java +++ b/hutool-core/src/main/java/org/dromara/hutool/core/bean/DynaBean.java @@ -16,7 +16,7 @@ import org.dromara.hutool.core.exception.CloneException; import org.dromara.hutool.core.lang.Assert; import org.dromara.hutool.core.reflect.ClassUtil; import org.dromara.hutool.core.reflect.ConstructorUtil; -import org.dromara.hutool.core.reflect.MethodUtil; +import org.dromara.hutool.core.reflect.method.MethodUtil; import java.io.Serializable; import java.util.Map; diff --git a/hutool-core/src/main/java/org/dromara/hutool/core/bean/PropDesc.java b/hutool-core/src/main/java/org/dromara/hutool/core/bean/PropDesc.java index 8d5d3aaae..a095ad758 100644 --- a/hutool-core/src/main/java/org/dromara/hutool/core/bean/PropDesc.java +++ b/hutool-core/src/main/java/org/dromara/hutool/core/bean/PropDesc.java @@ -17,6 +17,7 @@ import org.dromara.hutool.core.annotation.PropIgnore; import org.dromara.hutool.core.convert.Convert; import org.dromara.hutool.core.func.LambdaUtil; import org.dromara.hutool.core.reflect.*; +import org.dromara.hutool.core.reflect.method.MethodUtil; import java.beans.Transient; import java.lang.reflect.Field; diff --git a/hutool-core/src/main/java/org/dromara/hutool/core/bean/RecordUtil.java b/hutool-core/src/main/java/org/dromara/hutool/core/bean/RecordUtil.java index e65083b59..e131120a4 100644 --- a/hutool-core/src/main/java/org/dromara/hutool/core/bean/RecordUtil.java +++ b/hutool-core/src/main/java/org/dromara/hutool/core/bean/RecordUtil.java @@ -15,7 +15,7 @@ package org.dromara.hutool.core.bean; import org.dromara.hutool.core.bean.copier.ValueProvider; import org.dromara.hutool.core.classloader.ClassLoaderUtil; import org.dromara.hutool.core.reflect.ConstructorUtil; -import org.dromara.hutool.core.reflect.MethodUtil; +import org.dromara.hutool.core.reflect.method.MethodUtil; import org.dromara.hutool.core.util.JdkUtil; import java.lang.reflect.Method; diff --git a/hutool-core/src/main/java/org/dromara/hutool/core/classloader/JarClassLoader.java b/hutool-core/src/main/java/org/dromara/hutool/core/classloader/JarClassLoader.java index 1849b0a5a..acc66747b 100644 --- a/hutool-core/src/main/java/org/dromara/hutool/core/classloader/JarClassLoader.java +++ b/hutool-core/src/main/java/org/dromara/hutool/core/classloader/JarClassLoader.java @@ -15,7 +15,7 @@ package org.dromara.hutool.core.classloader; import org.dromara.hutool.core.exception.HutoolException; import org.dromara.hutool.core.io.file.FileUtil; import org.dromara.hutool.core.net.url.URLUtil; -import org.dromara.hutool.core.reflect.MethodUtil; +import org.dromara.hutool.core.reflect.method.MethodUtil; import java.io.File; import java.io.IOException; diff --git a/hutool-core/src/main/java/org/dromara/hutool/core/collection/iter/IterUtil.java b/hutool-core/src/main/java/org/dromara/hutool/core/collection/iter/IterUtil.java index c687b4626..11417713e 100644 --- a/hutool-core/src/main/java/org/dromara/hutool/core/collection/iter/IterUtil.java +++ b/hutool-core/src/main/java/org/dromara/hutool/core/collection/iter/IterUtil.java @@ -18,7 +18,7 @@ import org.dromara.hutool.core.collection.ListUtil; import org.dromara.hutool.core.lang.Assert; import org.dromara.hutool.core.map.MapUtil; import org.dromara.hutool.core.reflect.FieldUtil; -import org.dromara.hutool.core.reflect.MethodUtil; +import org.dromara.hutool.core.reflect.method.MethodUtil; import org.dromara.hutool.core.text.StrJoiner; import org.dromara.hutool.core.text.StrUtil; import org.dromara.hutool.core.util.ObjUtil; diff --git a/hutool-core/src/main/java/org/dromara/hutool/core/convert/impl/EnumConverter.java b/hutool-core/src/main/java/org/dromara/hutool/core/convert/impl/EnumConverter.java index 38d477eaa..df7c0e5f8 100644 --- a/hutool-core/src/main/java/org/dromara/hutool/core/convert/impl/EnumConverter.java +++ b/hutool-core/src/main/java/org/dromara/hutool/core/convert/impl/EnumConverter.java @@ -18,7 +18,7 @@ import org.dromara.hutool.core.lang.EnumItem; import org.dromara.hutool.core.map.MapUtil; import org.dromara.hutool.core.map.WeakConcurrentMap; import org.dromara.hutool.core.reflect.ClassUtil; -import org.dromara.hutool.core.reflect.MethodUtil; +import org.dromara.hutool.core.reflect.method.MethodUtil; import org.dromara.hutool.core.reflect.ModifierUtil; import org.dromara.hutool.core.util.EnumUtil; diff --git a/hutool-core/src/main/java/org/dromara/hutool/core/func/LambdaFactory.java b/hutool-core/src/main/java/org/dromara/hutool/core/func/LambdaFactory.java index 7e3588e6f..916d52497 100644 --- a/hutool-core/src/main/java/org/dromara/hutool/core/func/LambdaFactory.java +++ b/hutool-core/src/main/java/org/dromara/hutool/core/func/LambdaFactory.java @@ -18,6 +18,8 @@ import org.dromara.hutool.core.lang.mutable.MutableEntry; import org.dromara.hutool.core.map.WeakConcurrentMap; import org.dromara.hutool.core.reflect.*; import org.dromara.hutool.core.reflect.lookup.LookupUtil; +import org.dromara.hutool.core.reflect.method.MethodTypeUtil; +import org.dromara.hutool.core.reflect.method.MethodUtil; import java.lang.invoke.*; import java.lang.reflect.Executable; diff --git a/hutool-core/src/main/java/org/dromara/hutool/core/func/LambdaUtil.java b/hutool-core/src/main/java/org/dromara/hutool/core/func/LambdaUtil.java index b76049317..f57063ea8 100644 --- a/hutool-core/src/main/java/org/dromara/hutool/core/func/LambdaUtil.java +++ b/hutool-core/src/main/java/org/dromara/hutool/core/func/LambdaUtil.java @@ -19,7 +19,7 @@ import org.dromara.hutool.core.lang.Assert; import org.dromara.hutool.core.lang.Opt; import org.dromara.hutool.core.map.WeakConcurrentMap; import org.dromara.hutool.core.reflect.ClassDescUtil; -import org.dromara.hutool.core.reflect.MethodUtil; +import org.dromara.hutool.core.reflect.method.MethodUtil; import org.dromara.hutool.core.reflect.ModifierUtil; import java.io.Serializable; diff --git a/hutool-core/src/main/java/org/dromara/hutool/core/io/resource/VfsResource.java b/hutool-core/src/main/java/org/dromara/hutool/core/io/resource/VfsResource.java index 0f04eca83..2c0048c36 100644 --- a/hutool-core/src/main/java/org/dromara/hutool/core/io/resource/VfsResource.java +++ b/hutool-core/src/main/java/org/dromara/hutool/core/io/resource/VfsResource.java @@ -14,7 +14,7 @@ package org.dromara.hutool.core.io.resource; import org.dromara.hutool.core.classloader.ClassLoaderUtil; import org.dromara.hutool.core.lang.Assert; -import org.dromara.hutool.core.reflect.MethodUtil; +import org.dromara.hutool.core.reflect.method.MethodUtil; import java.io.InputStream; import java.lang.reflect.Method; diff --git a/hutool-core/src/main/java/org/dromara/hutool/core/reflect/ConstructorUtil.java b/hutool-core/src/main/java/org/dromara/hutool/core/reflect/ConstructorUtil.java index 1cef0123f..4d832899e 100644 --- a/hutool-core/src/main/java/org/dromara/hutool/core/reflect/ConstructorUtil.java +++ b/hutool-core/src/main/java/org/dromara/hutool/core/reflect/ConstructorUtil.java @@ -17,6 +17,7 @@ import org.dromara.hutool.core.exception.HutoolException; import org.dromara.hutool.core.lang.Assert; import org.dromara.hutool.core.map.WeakConcurrentMap; import org.dromara.hutool.core.reflect.lookup.LookupUtil; +import org.dromara.hutool.core.reflect.method.MethodHandleUtil; import java.lang.invoke.MethodHandle; import java.lang.reflect.Array; diff --git a/hutool-core/src/main/java/org/dromara/hutool/core/reflect/ReflectUtil.java b/hutool-core/src/main/java/org/dromara/hutool/core/reflect/ReflectUtil.java index 7c05ba362..8e52d93a7 100644 --- a/hutool-core/src/main/java/org/dromara/hutool/core/reflect/ReflectUtil.java +++ b/hutool-core/src/main/java/org/dromara/hutool/core/reflect/ReflectUtil.java @@ -12,6 +12,8 @@ package org.dromara.hutool.core.reflect; +import org.dromara.hutool.core.reflect.method.MethodUtil; + import java.lang.reflect.*; /** diff --git a/hutool-core/src/main/java/org/dromara/hutool/core/reflect/kotlin/KCallable.java b/hutool-core/src/main/java/org/dromara/hutool/core/reflect/kotlin/KCallable.java index 9c0fd9fee..c67a84ae0 100644 --- a/hutool-core/src/main/java/org/dromara/hutool/core/reflect/kotlin/KCallable.java +++ b/hutool-core/src/main/java/org/dromara/hutool/core/reflect/kotlin/KCallable.java @@ -13,7 +13,7 @@ package org.dromara.hutool.core.reflect.kotlin; import org.dromara.hutool.core.classloader.ClassLoaderUtil; -import org.dromara.hutool.core.reflect.MethodUtil; +import org.dromara.hutool.core.reflect.method.MethodUtil; import java.lang.reflect.Method; import java.util.ArrayList; diff --git a/hutool-core/src/main/java/org/dromara/hutool/core/reflect/kotlin/KClassImpl.java b/hutool-core/src/main/java/org/dromara/hutool/core/reflect/kotlin/KClassImpl.java index 5e56273d6..57e993668 100644 --- a/hutool-core/src/main/java/org/dromara/hutool/core/reflect/kotlin/KClassImpl.java +++ b/hutool-core/src/main/java/org/dromara/hutool/core/reflect/kotlin/KClassImpl.java @@ -14,7 +14,7 @@ package org.dromara.hutool.core.reflect.kotlin; import org.dromara.hutool.core.classloader.ClassLoaderUtil; import org.dromara.hutool.core.reflect.ConstructorUtil; -import org.dromara.hutool.core.reflect.MethodUtil; +import org.dromara.hutool.core.reflect.method.MethodUtil; import java.lang.reflect.Method; import java.util.List; diff --git a/hutool-core/src/main/java/org/dromara/hutool/core/reflect/kotlin/KParameter.java b/hutool-core/src/main/java/org/dromara/hutool/core/reflect/kotlin/KParameter.java index f20643a2b..edd72bc35 100644 --- a/hutool-core/src/main/java/org/dromara/hutool/core/reflect/kotlin/KParameter.java +++ b/hutool-core/src/main/java/org/dromara/hutool/core/reflect/kotlin/KParameter.java @@ -13,7 +13,7 @@ package org.dromara.hutool.core.reflect.kotlin; import org.dromara.hutool.core.classloader.ClassLoaderUtil; -import org.dromara.hutool.core.reflect.MethodUtil; +import org.dromara.hutool.core.reflect.method.MethodUtil; import java.lang.reflect.Method; import java.util.Objects; diff --git a/hutool-core/src/main/java/org/dromara/hutool/core/reflect/MethodHandleUtil.java b/hutool-core/src/main/java/org/dromara/hutool/core/reflect/method/MethodHandleUtil.java similarity index 98% rename from hutool-core/src/main/java/org/dromara/hutool/core/reflect/MethodHandleUtil.java rename to hutool-core/src/main/java/org/dromara/hutool/core/reflect/method/MethodHandleUtil.java index ce8e4b715..ea783f7c3 100644 --- a/hutool-core/src/main/java/org/dromara/hutool/core/reflect/MethodHandleUtil.java +++ b/hutool-core/src/main/java/org/dromara/hutool/core/reflect/method/MethodHandleUtil.java @@ -10,7 +10,7 @@ * See the Mulan PSL v2 for more details. */ -package org.dromara.hutool.core.reflect; +package org.dromara.hutool.core.reflect.method; import org.dromara.hutool.core.exception.HutoolException; import org.dromara.hutool.core.lang.Assert; diff --git a/hutool-core/src/main/java/org/dromara/hutool/core/reflect/method/MethodMatcher.java b/hutool-core/src/main/java/org/dromara/hutool/core/reflect/method/MethodMatcher.java index 5af32994c..54e3b09d2 100644 --- a/hutool-core/src/main/java/org/dromara/hutool/core/reflect/method/MethodMatcher.java +++ b/hutool-core/src/main/java/org/dromara/hutool/core/reflect/method/MethodMatcher.java @@ -10,7 +10,7 @@ import java.util.function.Predicate; * 若方法符合条件,则返回{@link Boolean#TRUE},否则返回{@code null}。 * * @author huangchengxing - * @see MethodMatcherUtils + * @see MethodMatcherUtil * @see MethodMetadataLookup * @since 6.0.0 */ diff --git a/hutool-core/src/main/java/org/dromara/hutool/core/reflect/method/MethodMatcherUtils.java b/hutool-core/src/main/java/org/dromara/hutool/core/reflect/method/MethodMatcherUtil.java similarity index 99% rename from hutool-core/src/main/java/org/dromara/hutool/core/reflect/method/MethodMatcherUtils.java rename to hutool-core/src/main/java/org/dromara/hutool/core/reflect/method/MethodMatcherUtil.java index 840ef62f9..555163ed3 100644 --- a/hutool-core/src/main/java/org/dromara/hutool/core/reflect/method/MethodMatcherUtils.java +++ b/hutool-core/src/main/java/org/dromara/hutool/core/reflect/method/MethodMatcherUtil.java @@ -23,7 +23,7 @@ import java.util.stream.Stream; * @see MethodMatcher * @since 6.0.0 */ -public class MethodMatcherUtils { +public class MethodMatcherUtil { /** diff --git a/hutool-core/src/main/java/org/dromara/hutool/core/reflect/method/MethodMetadataLookup.java b/hutool-core/src/main/java/org/dromara/hutool/core/reflect/method/MethodMetadataLookup.java index 6e497e050..21c7b1d10 100644 --- a/hutool-core/src/main/java/org/dromara/hutool/core/reflect/method/MethodMetadataLookup.java +++ b/hutool-core/src/main/java/org/dromara/hutool/core/reflect/method/MethodMetadataLookup.java @@ -7,7 +7,7 @@ import java.lang.reflect.Method; * * @author huangchengxing * @see MethodMatcher - * @see MethodMatcherUtils + * @see MethodMatcherUtil * @since 6.0.0 */ @FunctionalInterface diff --git a/hutool-core/src/main/java/org/dromara/hutool/core/reflect/method/MethodScanner.java b/hutool-core/src/main/java/org/dromara/hutool/core/reflect/method/MethodScanner.java index 2d4be4eb9..8c35c8d0c 100644 --- a/hutool-core/src/main/java/org/dromara/hutool/core/reflect/method/MethodScanner.java +++ b/hutool-core/src/main/java/org/dromara/hutool/core/reflect/method/MethodScanner.java @@ -6,7 +6,6 @@ import org.dromara.hutool.core.lang.mutable.MutableObj; import org.dromara.hutool.core.map.MapUtil; import org.dromara.hutool.core.map.WeakConcurrentMap; import org.dromara.hutool.core.reflect.ClassUtil; -import org.dromara.hutool.core.reflect.MethodUtil; import java.lang.reflect.Method; import java.util.*; @@ -41,7 +40,7 @@ import java.util.function.Predicate; *
{@code * Map- * 此外,对于一些无需获取元数据的查找,我们可以使用{@link MethodMatcherUtils}提供的一些内置实现: + * 此外,对于一些无需获取元数据的查找,我们可以使用{@link MethodMatcherUtil}提供的一些内置实现: *methods = MethodScanner.findFromAllMethods(Foo.class, method -> method.getAnnotation(Annotation.class)); * }
{@code * // 查找所有静态公开方法 * Setmethods = MethodScanner.findFromAllMethods(Foo.class, MethodMatcherUtils.isPublicStatic()); @@ -60,7 +59,7 @@ import java.util.function.Predicate; * @author huangchengxing * @see MethodMetadataLookup * @see MethodMatcher - * @see MethodMatcherUtils + * @see MethodMatcherUtil * @since 6.0.0 */ public class MethodScanner { diff --git a/hutool-core/src/main/java/org/dromara/hutool/core/reflect/MethodTypeUtil.java b/hutool-core/src/main/java/org/dromara/hutool/core/reflect/method/MethodTypeUtil.java similarity index 97% rename from hutool-core/src/main/java/org/dromara/hutool/core/reflect/MethodTypeUtil.java rename to hutool-core/src/main/java/org/dromara/hutool/core/reflect/method/MethodTypeUtil.java index d442c2e2b..7cf9e8535 100644 --- a/hutool-core/src/main/java/org/dromara/hutool/core/reflect/MethodTypeUtil.java +++ b/hutool-core/src/main/java/org/dromara/hutool/core/reflect/method/MethodTypeUtil.java @@ -10,7 +10,7 @@ * See the Mulan PSL v2 for more details. */ -package org.dromara.hutool.core.reflect; +package org.dromara.hutool.core.reflect.method; import java.lang.invoke.MethodType; import java.lang.reflect.Constructor; diff --git a/hutool-core/src/main/java/org/dromara/hutool/core/reflect/MethodUtil.java b/hutool-core/src/main/java/org/dromara/hutool/core/reflect/method/MethodUtil.java similarity index 99% rename from hutool-core/src/main/java/org/dromara/hutool/core/reflect/MethodUtil.java rename to hutool-core/src/main/java/org/dromara/hutool/core/reflect/method/MethodUtil.java index ce1a18cce..65df30852 100644 --- a/hutool-core/src/main/java/org/dromara/hutool/core/reflect/MethodUtil.java +++ b/hutool-core/src/main/java/org/dromara/hutool/core/reflect/method/MethodUtil.java @@ -10,7 +10,7 @@ * See the Mulan PSL v2 for more details. */ -package org.dromara.hutool.core.reflect; +package org.dromara.hutool.core.reflect.method; import org.dromara.hutool.core.array.ArrayUtil; import org.dromara.hutool.core.bean.NullWrapperBean; @@ -22,6 +22,9 @@ import org.dromara.hutool.core.exception.HutoolException; import org.dromara.hutool.core.lang.Assert; import org.dromara.hutool.core.lang.Singleton; import org.dromara.hutool.core.map.WeakConcurrentMap; +import org.dromara.hutool.core.reflect.ClassUtil; +import org.dromara.hutool.core.reflect.ConstructorUtil; +import org.dromara.hutool.core.reflect.ModifierUtil; import org.dromara.hutool.core.text.StrUtil; import org.dromara.hutool.core.util.BooleanUtil; diff --git a/hutool-core/src/main/java/org/dromara/hutool/core/reflect/method/package-info.java b/hutool-core/src/main/java/org/dromara/hutool/core/reflect/method/package-info.java new file mode 100644 index 000000000..4c78b90e0 --- /dev/null +++ b/hutool-core/src/main/java/org/dromara/hutool/core/reflect/method/package-info.java @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2023 looly(loolly@aliyun.com) + * Hutool is licensed under Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, + * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, + * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. + * See the Mulan PSL v2 for more details. + */ + +/** + * 提供方法相关封装 + * + * @author huangchengxing, looly + * @since 6.0.0 + */ +package org.dromara.hutool.core.reflect.method; diff --git a/hutool-core/src/main/java/org/dromara/hutool/core/regex/ReUtil.java b/hutool-core/src/main/java/org/dromara/hutool/core/regex/ReUtil.java index 29b7a3b9e..bc88e3413 100644 --- a/hutool-core/src/main/java/org/dromara/hutool/core/regex/ReUtil.java +++ b/hutool-core/src/main/java/org/dromara/hutool/core/regex/ReUtil.java @@ -23,7 +23,7 @@ import org.dromara.hutool.core.lang.Validator; import org.dromara.hutool.core.lang.mutable.Mutable; import org.dromara.hutool.core.lang.mutable.MutableObj; import org.dromara.hutool.core.map.MapUtil; -import org.dromara.hutool.core.reflect.MethodUtil; +import org.dromara.hutool.core.reflect.method.MethodUtil; import org.dromara.hutool.core.text.StrUtil; import java.util.*; diff --git a/hutool-core/src/main/java/org/dromara/hutool/core/util/ObjUtil.java b/hutool-core/src/main/java/org/dromara/hutool/core/util/ObjUtil.java index 1c9bb0b87..bdea97a1c 100644 --- a/hutool-core/src/main/java/org/dromara/hutool/core/util/ObjUtil.java +++ b/hutool-core/src/main/java/org/dromara/hutool/core/util/ObjUtil.java @@ -21,7 +21,7 @@ import org.dromara.hutool.core.io.SerializeUtil; import org.dromara.hutool.core.map.MapUtil; import org.dromara.hutool.core.math.NumberUtil; import org.dromara.hutool.core.reflect.ClassUtil; -import org.dromara.hutool.core.reflect.MethodUtil; +import org.dromara.hutool.core.reflect.method.MethodUtil; import org.dromara.hutool.core.text.CharSequenceUtil; import org.dromara.hutool.core.text.StrUtil; diff --git a/hutool-core/src/test/java/org/dromara/hutool/core/func/LambdaUtilTest.java b/hutool-core/src/test/java/org/dromara/hutool/core/func/LambdaUtilTest.java index 5b318bfd1..e6526f22a 100644 --- a/hutool-core/src/test/java/org/dromara/hutool/core/func/LambdaUtilTest.java +++ b/hutool-core/src/test/java/org/dromara/hutool/core/func/LambdaUtilTest.java @@ -17,7 +17,7 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.FieldNameConstants; import org.dromara.hutool.core.lang.tuple.Tuple; -import org.dromara.hutool.core.reflect.MethodUtil; +import org.dromara.hutool.core.reflect.method.MethodUtil; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.condition.EnabledForJreRange; diff --git a/hutool-core/src/test/java/org/dromara/hutool/core/reflect/MethodHandleUtilTest.java b/hutool-core/src/test/java/org/dromara/hutool/core/reflect/MethodHandleUtilTest.java index 0f88f25a9..5aa5f1833 100644 --- a/hutool-core/src/test/java/org/dromara/hutool/core/reflect/MethodHandleUtilTest.java +++ b/hutool-core/src/test/java/org/dromara/hutool/core/reflect/MethodHandleUtilTest.java @@ -1,6 +1,8 @@ package org.dromara.hutool.core.reflect; import org.dromara.hutool.core.classloader.ClassLoaderUtil; +import org.dromara.hutool.core.reflect.method.MethodHandleUtil; +import org.dromara.hutool.core.reflect.method.MethodUtil; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/hutool-core/src/test/java/org/dromara/hutool/core/reflect/MethodUtilTest.java b/hutool-core/src/test/java/org/dromara/hutool/core/reflect/MethodUtilTest.java index cac21a282..2c0f835e5 100644 --- a/hutool-core/src/test/java/org/dromara/hutool/core/reflect/MethodUtilTest.java +++ b/hutool-core/src/test/java/org/dromara/hutool/core/reflect/MethodUtilTest.java @@ -5,6 +5,7 @@ import org.dromara.hutool.core.array.ArrayUtil; import org.dromara.hutool.core.date.StopWatch; import org.dromara.hutool.core.lang.Console; import org.dromara.hutool.core.lang.test.bean.ExamInfoDict; +import org.dromara.hutool.core.reflect.method.MethodUtil; import org.dromara.hutool.core.text.StrUtil; import org.dromara.hutool.core.util.JdkUtil; import org.junit.jupiter.api.Assertions; diff --git a/hutool-core/src/test/java/org/dromara/hutool/core/reflect/lookup/LookupUtilTest.java b/hutool-core/src/test/java/org/dromara/hutool/core/reflect/lookup/LookupUtilTest.java index 92fe9e168..d85cee3a2 100644 --- a/hutool-core/src/test/java/org/dromara/hutool/core/reflect/lookup/LookupUtilTest.java +++ b/hutool-core/src/test/java/org/dromara/hutool/core/reflect/lookup/LookupUtilTest.java @@ -12,7 +12,7 @@ package org.dromara.hutool.core.reflect.lookup; -import org.dromara.hutool.core.reflect.MethodUtil; +import org.dromara.hutool.core.reflect.method.MethodUtil; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/hutool-core/src/test/java/org/dromara/hutool/core/reflect/method/MethodMatcherUtilsTest.java b/hutool-core/src/test/java/org/dromara/hutool/core/reflect/method/MethodMatcherUtilsTest.java index 5b94dda2d..591a0e77a 100644 --- a/hutool-core/src/test/java/org/dromara/hutool/core/reflect/method/MethodMatcherUtilsTest.java +++ b/hutool-core/src/test/java/org/dromara/hutool/core/reflect/method/MethodMatcherUtilsTest.java @@ -19,7 +19,7 @@ import java.util.List; import java.util.Set; /** - * test for {@link MethodMatcherUtils} + * test for {@link MethodMatcherUtil} * * @author huangchengxing */ @@ -47,25 +47,25 @@ class MethodMatcherUtilsTest { @Test void testForName() { - MethodMatcher methodMatcher = MethodMatcherUtils.forName("noneReturnNoArgs"); + MethodMatcher methodMatcher = MethodMatcherUtil.forName("noneReturnNoArgs"); Assertions.assertTrue(methodMatcher.test(noneReturnNoArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnOneArgs)); } @Test void forNameIgnoreCase() { - MethodMatcher methodMatcher = MethodMatcherUtils.forNameIgnoreCase("noneReturnNoArgs"); + MethodMatcher methodMatcher = MethodMatcherUtil.forNameIgnoreCase("noneReturnNoArgs"); Assertions.assertTrue(methodMatcher.test(noneReturnNoArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnOneArgs)); // if name is upper case, it will be ignored - methodMatcher = MethodMatcherUtils.forNameIgnoreCase("NONERETURNNOARGS"); + methodMatcher = MethodMatcherUtil.forNameIgnoreCase("NONERETURNNOARGS"); Assertions.assertTrue(methodMatcher.test(noneReturnNoArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnOneArgs)); } @Test void forNoneReturnType() { - MethodMatcher methodMatcher = MethodMatcherUtils.forNoneReturnType(); + MethodMatcher methodMatcher = MethodMatcherUtil.forNoneReturnType(); Assertions.assertTrue(methodMatcher.test(noneReturnNoArgs)); Assertions.assertTrue(methodMatcher.test(noneReturnOneArgs)); Assertions.assertTrue(methodMatcher.test(noneReturnTwoArgs)); @@ -76,7 +76,7 @@ class MethodMatcherUtilsTest { @Test void forReturnType() { - MethodMatcher methodMatcher = MethodMatcherUtils.forReturnType(Collection.class); + MethodMatcher methodMatcher = MethodMatcherUtil.forReturnType(Collection.class); Assertions.assertFalse(methodMatcher.test(noneReturnNoArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnOneArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnTwoArgs)); @@ -87,7 +87,7 @@ class MethodMatcherUtilsTest { @Test void forStrictReturnType() { - MethodMatcher methodMatcher = MethodMatcherUtils.forStrictReturnType(Collection.class); + MethodMatcher methodMatcher = MethodMatcherUtil.forStrictReturnType(Collection.class); Assertions.assertFalse(methodMatcher.test(noneReturnNoArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnOneArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnTwoArgs)); @@ -95,7 +95,7 @@ class MethodMatcherUtilsTest { Assertions.assertFalse(methodMatcher.test(returnOneArgs)); Assertions.assertFalse(methodMatcher.test(returnTwoArgs)); // only match return type is strict equal to parameter type - methodMatcher = MethodMatcherUtils.forStrictReturnType(List.class); + methodMatcher = MethodMatcherUtil.forStrictReturnType(List.class); Assertions.assertFalse(methodMatcher.test(noneReturnNoArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnOneArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnTwoArgs)); @@ -106,7 +106,7 @@ class MethodMatcherUtilsTest { @Test void forParameterCount() { - MethodMatcher methodMatcher = MethodMatcherUtils.forParameterCount(2); + MethodMatcher methodMatcher = MethodMatcherUtil.forParameterCount(2); Assertions.assertFalse(methodMatcher.test(noneReturnNoArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnOneArgs)); Assertions.assertTrue(methodMatcher.test(noneReturnTwoArgs)); @@ -115,30 +115,30 @@ class MethodMatcherUtilsTest { @Test void forMostSpecificParameterTypes() { // match none args method - MethodMatcher methodMatcher = MethodMatcherUtils.forMostSpecificParameterTypes(); + MethodMatcher methodMatcher = MethodMatcherUtil.forMostSpecificParameterTypes(); Assertions.assertFalse(methodMatcher.test(returnTwoArgs)); Assertions.assertTrue(methodMatcher.test(noneReturnNoArgs)); // match all args types - methodMatcher = MethodMatcherUtils.forMostSpecificParameterTypes(null, null); + methodMatcher = MethodMatcherUtil.forMostSpecificParameterTypes(null, null); Assertions.assertTrue(methodMatcher.test(returnTwoArgs)); Assertions.assertTrue(methodMatcher.test(noneReturnTwoArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnOneArgs)); // match first arg type - methodMatcher = MethodMatcherUtils.forMostSpecificParameterTypes(CharSequence.class, null); + methodMatcher = MethodMatcherUtil.forMostSpecificParameterTypes(CharSequence.class, null); Assertions.assertTrue(methodMatcher.test(returnTwoArgs)); Assertions.assertTrue(methodMatcher.test(noneReturnTwoArgs)); Assertions.assertFalse(methodMatcher.test(returnOneArgs)); // match second arg type - methodMatcher = MethodMatcherUtils.forMostSpecificParameterTypes(null, Collection.class); + methodMatcher = MethodMatcherUtil.forMostSpecificParameterTypes(null, Collection.class); Assertions.assertTrue(methodMatcher.test(returnTwoArgs)); Assertions.assertTrue(methodMatcher.test(noneReturnTwoArgs)); Assertions.assertFalse(methodMatcher.test(returnOneArgs)); // match two arg type - methodMatcher = MethodMatcherUtils.forMostSpecificParameterTypes(CharSequence.class, Collection.class); + methodMatcher = MethodMatcherUtil.forMostSpecificParameterTypes(CharSequence.class, Collection.class); Assertions.assertTrue(methodMatcher.test(returnTwoArgs)); Assertions.assertTrue(methodMatcher.test(noneReturnTwoArgs)); Assertions.assertFalse(methodMatcher.test(returnOneArgs)); @@ -147,34 +147,34 @@ class MethodMatcherUtilsTest { @Test void forMostSpecificStrictParameterTypes() { // match none args method - MethodMatcher methodMatcher = MethodMatcherUtils.forMostSpecificStrictParameterTypes(); + MethodMatcher methodMatcher = MethodMatcherUtil.forMostSpecificStrictParameterTypes(); Assertions.assertFalse(methodMatcher.test(returnTwoArgs)); Assertions.assertTrue(methodMatcher.test(noneReturnNoArgs)); // match all args types - methodMatcher = MethodMatcherUtils.forMostSpecificStrictParameterTypes(null, null); + methodMatcher = MethodMatcherUtil.forMostSpecificStrictParameterTypes(null, null); Assertions.assertTrue(methodMatcher.test(returnTwoArgs)); Assertions.assertTrue(methodMatcher.test(noneReturnTwoArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnOneArgs)); // match first arg type - methodMatcher = MethodMatcherUtils.forMostSpecificStrictParameterTypes(CharSequence.class, null); + methodMatcher = MethodMatcherUtil.forMostSpecificStrictParameterTypes(CharSequence.class, null); Assertions.assertFalse(methodMatcher.test(returnTwoArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnTwoArgs)); Assertions.assertFalse(methodMatcher.test(returnOneArgs)); - methodMatcher = MethodMatcherUtils.forMostSpecificStrictParameterTypes(String.class, null); + methodMatcher = MethodMatcherUtil.forMostSpecificStrictParameterTypes(String.class, null); Assertions.assertTrue(methodMatcher.test(returnTwoArgs)); Assertions.assertTrue(methodMatcher.test(noneReturnTwoArgs)); Assertions.assertFalse(methodMatcher.test(returnOneArgs)); // match second arg type - methodMatcher = MethodMatcherUtils.forMostSpecificStrictParameterTypes(null, Collection.class); + methodMatcher = MethodMatcherUtil.forMostSpecificStrictParameterTypes(null, Collection.class); Assertions.assertFalse(methodMatcher.test(returnTwoArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnTwoArgs)); Assertions.assertFalse(methodMatcher.test(returnOneArgs)); // match two arg type - methodMatcher = MethodMatcherUtils.forMostSpecificStrictParameterTypes(CharSequence.class, Collection.class); + methodMatcher = MethodMatcherUtil.forMostSpecificStrictParameterTypes(CharSequence.class, Collection.class); Assertions.assertFalse(methodMatcher.test(returnTwoArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnTwoArgs)); Assertions.assertFalse(methodMatcher.test(returnOneArgs)); @@ -182,7 +182,7 @@ class MethodMatcherUtilsTest { @Test void forParameterTypes() { - MethodMatcher methodMatcher = MethodMatcherUtils.forParameterTypes(); + MethodMatcher methodMatcher = MethodMatcherUtil.forParameterTypes(); Assertions.assertTrue(methodMatcher.test(noneReturnNoArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnOneArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnTwoArgs)); @@ -190,7 +190,7 @@ class MethodMatcherUtilsTest { Assertions.assertFalse(methodMatcher.test(returnOneArgs)); Assertions.assertFalse(methodMatcher.test(returnTwoArgs)); // match parameter types is empty - methodMatcher = MethodMatcherUtils.forParameterTypes(CharSequence.class, Collection.class); + methodMatcher = MethodMatcherUtil.forParameterTypes(CharSequence.class, Collection.class); Assertions.assertFalse(methodMatcher.test(noneReturnNoArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnOneArgs)); Assertions.assertTrue(methodMatcher.test(noneReturnTwoArgs)); @@ -201,7 +201,7 @@ class MethodMatcherUtilsTest { @Test void forStrictParameterTypes() { - MethodMatcher methodMatcher = MethodMatcherUtils.forStrictParameterTypes(); + MethodMatcher methodMatcher = MethodMatcherUtil.forStrictParameterTypes(); Assertions.assertTrue(methodMatcher.test(noneReturnNoArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnOneArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnTwoArgs)); @@ -210,7 +210,7 @@ class MethodMatcherUtilsTest { Assertions.assertFalse(methodMatcher.test(returnTwoArgs)); // cannot match assignable parameter types - methodMatcher = MethodMatcherUtils.forStrictParameterTypes(CharSequence.class, Collection.class); + methodMatcher = MethodMatcherUtil.forStrictParameterTypes(CharSequence.class, Collection.class); Assertions.assertFalse(methodMatcher.test(noneReturnNoArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnOneArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnTwoArgs)); @@ -219,7 +219,7 @@ class MethodMatcherUtilsTest { Assertions.assertFalse(methodMatcher.test(returnTwoArgs)); // only match parameter types is strict equal to parameter type - methodMatcher = MethodMatcherUtils.forStrictParameterTypes(String.class, List.class); + methodMatcher = MethodMatcherUtil.forStrictParameterTypes(String.class, List.class); Assertions.assertFalse(methodMatcher.test(noneReturnNoArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnOneArgs)); Assertions.assertTrue(methodMatcher.test(noneReturnTwoArgs)); @@ -230,7 +230,7 @@ class MethodMatcherUtilsTest { @Test void noneMatch() { - MethodMatcher methodMatcher = MethodMatcherUtils.noneMatch(); + MethodMatcher methodMatcher = MethodMatcherUtil.noneMatch(); Assertions.assertTrue(methodMatcher.test(noneReturnNoArgs)); Assertions.assertTrue(methodMatcher.test(noneReturnOneArgs)); Assertions.assertTrue(methodMatcher.test(noneReturnTwoArgs)); @@ -239,9 +239,9 @@ class MethodMatcherUtilsTest { Assertions.assertTrue(methodMatcher.test(returnTwoArgs)); // combine with other matchers - methodMatcher = MethodMatcherUtils.noneMatch( - MethodMatcherUtils.forName("noneReturnNoArgs"), - MethodMatcherUtils.forReturnType(Collection.class) + methodMatcher = MethodMatcherUtil.noneMatch( + MethodMatcherUtil.forName("noneReturnNoArgs"), + MethodMatcherUtil.forReturnType(Collection.class) ); Assertions.assertFalse(methodMatcher.test(noneReturnNoArgs)); Assertions.assertTrue(methodMatcher.test(noneReturnOneArgs)); @@ -249,7 +249,7 @@ class MethodMatcherUtilsTest { @Test void anyMatch() { - MethodMatcher methodMatcher = MethodMatcherUtils.anyMatch(); + MethodMatcher methodMatcher = MethodMatcherUtil.anyMatch(); Assertions.assertFalse(methodMatcher.test(noneReturnNoArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnOneArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnTwoArgs)); @@ -258,9 +258,9 @@ class MethodMatcherUtilsTest { Assertions.assertFalse(methodMatcher.test(returnTwoArgs)); // combine with other matchers - methodMatcher = MethodMatcherUtils.anyMatch( - MethodMatcherUtils.forName("noneReturnNoArgs"), - MethodMatcherUtils.forReturnType(Collection.class) + methodMatcher = MethodMatcherUtil.anyMatch( + MethodMatcherUtil.forName("noneReturnNoArgs"), + MethodMatcherUtil.forReturnType(Collection.class) ); Assertions.assertTrue(methodMatcher.test(returnNoArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnOneArgs)); @@ -269,7 +269,7 @@ class MethodMatcherUtilsTest { @Test void allMatch() { - MethodMatcher methodMatcher = MethodMatcherUtils.allMatch(); + MethodMatcher methodMatcher = MethodMatcherUtil.allMatch(); Assertions.assertTrue(methodMatcher.test(noneReturnNoArgs)); Assertions.assertTrue(methodMatcher.test(noneReturnOneArgs)); Assertions.assertTrue(methodMatcher.test(noneReturnTwoArgs)); @@ -278,9 +278,9 @@ class MethodMatcherUtilsTest { Assertions.assertTrue(methodMatcher.test(returnTwoArgs)); // combine with other matchers - methodMatcher = MethodMatcherUtils.allMatch( - MethodMatcherUtils.forName("noneReturnNoArgs"), - MethodMatcherUtils.forReturnType(Collection.class) + methodMatcher = MethodMatcherUtil.allMatch( + MethodMatcherUtil.forName("noneReturnNoArgs"), + MethodMatcherUtil.forReturnType(Collection.class) ); Assertions.assertFalse(methodMatcher.test(noneReturnNoArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnOneArgs)); @@ -292,7 +292,7 @@ class MethodMatcherUtilsTest { @Test void isPublic() { - MethodMatcher methodMatcher = MethodMatcherUtils.isPublic(); + MethodMatcher methodMatcher = MethodMatcherUtil.isPublic(); Assertions.assertFalse(methodMatcher.test(noneReturnNoArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnOneArgs)); Assertions.assertTrue(methodMatcher.test(noneReturnTwoArgs)); @@ -303,7 +303,7 @@ class MethodMatcherUtilsTest { @Test void isStatic() { - MethodMatcher methodMatcher = MethodMatcherUtils.isStatic(); + MethodMatcher methodMatcher = MethodMatcherUtil.isStatic(); Assertions.assertFalse(methodMatcher.test(noneReturnNoArgs)); Assertions.assertTrue(methodMatcher.test(noneReturnOneArgs)); Assertions.assertTrue(methodMatcher.test(noneReturnTwoArgs)); @@ -314,7 +314,7 @@ class MethodMatcherUtilsTest { @Test void isPublicStatic() { - MethodMatcher methodMatcher = MethodMatcherUtils.isPublicStatic(); + MethodMatcher methodMatcher = MethodMatcherUtil.isPublicStatic(); Assertions.assertFalse(methodMatcher.test(noneReturnNoArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnOneArgs)); Assertions.assertTrue(methodMatcher.test(noneReturnTwoArgs)); @@ -325,7 +325,7 @@ class MethodMatcherUtilsTest { @Test void forModifiers() { - MethodMatcher methodMatcher = MethodMatcherUtils.forModifiers(Modifier.PUBLIC, Modifier.STATIC); + MethodMatcher methodMatcher = MethodMatcherUtil.forModifiers(Modifier.PUBLIC, Modifier.STATIC); Assertions.assertFalse(methodMatcher.test(noneReturnNoArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnOneArgs)); Assertions.assertTrue(methodMatcher.test(noneReturnTwoArgs)); @@ -336,7 +336,7 @@ class MethodMatcherUtilsTest { @Test void forNameAndParameterTypes() { - MethodMatcher methodMatcher = MethodMatcherUtils.forNameAndParameterTypes("noneReturnTwoArgs", CharSequence.class, List.class); + MethodMatcher methodMatcher = MethodMatcherUtil.forNameAndParameterTypes("noneReturnTwoArgs", CharSequence.class, List.class); Assertions.assertFalse(methodMatcher.test(noneReturnNoArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnOneArgs)); Assertions.assertTrue(methodMatcher.test(noneReturnTwoArgs)); @@ -347,7 +347,7 @@ class MethodMatcherUtilsTest { @Test void forNameAndStrictParameterTypes() { - MethodMatcher methodMatcher = MethodMatcherUtils.forNameAndStrictParameterTypes("noneReturnTwoArgs", CharSequence.class, List.class); + MethodMatcher methodMatcher = MethodMatcherUtil.forNameAndStrictParameterTypes("noneReturnTwoArgs", CharSequence.class, List.class); Assertions.assertFalse(methodMatcher.test(noneReturnNoArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnOneArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnTwoArgs)); @@ -355,7 +355,7 @@ class MethodMatcherUtilsTest { Assertions.assertFalse(methodMatcher.test(returnOneArgs)); Assertions.assertFalse(methodMatcher.test(returnTwoArgs)); - methodMatcher = MethodMatcherUtils.forNameAndStrictParameterTypes("returnTwoArgs", String.class, List.class); + methodMatcher = MethodMatcherUtil.forNameAndStrictParameterTypes("returnTwoArgs", String.class, List.class); Assertions.assertFalse(methodMatcher.test(noneReturnNoArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnOneArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnTwoArgs)); @@ -366,7 +366,7 @@ class MethodMatcherUtilsTest { @Test void forNameIgnoreCaseAndParameterTypes() { - MethodMatcher methodMatcher = MethodMatcherUtils.forNameIgnoreCaseAndParameterTypes("NONEReturnTWOArgs", CharSequence.class, List.class); + MethodMatcher methodMatcher = MethodMatcherUtil.forNameIgnoreCaseAndParameterTypes("NONEReturnTWOArgs", CharSequence.class, List.class); Assertions.assertFalse(methodMatcher.test(noneReturnNoArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnOneArgs)); Assertions.assertTrue(methodMatcher.test(noneReturnTwoArgs)); @@ -374,7 +374,7 @@ class MethodMatcherUtilsTest { Assertions.assertFalse(methodMatcher.test(returnOneArgs)); Assertions.assertFalse(methodMatcher.test(returnTwoArgs)); - methodMatcher = MethodMatcherUtils.forNameIgnoreCaseAndParameterTypes("ReturnTWOArgs", String.class, List.class); + methodMatcher = MethodMatcherUtil.forNameIgnoreCaseAndParameterTypes("ReturnTWOArgs", String.class, List.class); Assertions.assertFalse(methodMatcher.test(noneReturnNoArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnOneArgs)); Assertions.assertTrue(methodMatcher.test(noneReturnTwoArgs)); @@ -385,7 +385,7 @@ class MethodMatcherUtilsTest { @Test void forNameIgnoreCaseAndStrictParameterTypes() { - MethodMatcher methodMatcher = MethodMatcherUtils.forNameIgnoreCaseAndStrictParameterTypes("NONEReturnTWOArgs", CharSequence.class, List.class); + MethodMatcher methodMatcher = MethodMatcherUtil.forNameIgnoreCaseAndStrictParameterTypes("NONEReturnTWOArgs", CharSequence.class, List.class); Assertions.assertFalse(methodMatcher.test(noneReturnNoArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnOneArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnTwoArgs)); @@ -393,7 +393,7 @@ class MethodMatcherUtilsTest { Assertions.assertFalse(methodMatcher.test(returnOneArgs)); Assertions.assertFalse(methodMatcher.test(returnTwoArgs)); - methodMatcher = MethodMatcherUtils.forNameIgnoreCaseAndStrictParameterTypes("ReturnTWOArgs", String.class, List.class); + methodMatcher = MethodMatcherUtil.forNameIgnoreCaseAndStrictParameterTypes("ReturnTWOArgs", String.class, List.class); Assertions.assertFalse(methodMatcher.test(noneReturnNoArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnOneArgs)); Assertions.assertTrue(methodMatcher.test(noneReturnTwoArgs)); @@ -404,7 +404,7 @@ class MethodMatcherUtilsTest { @Test void forStrictMethodSignature() { - MethodMatcher methodMatcher = MethodMatcherUtils.forStrictMethodSignature("noneReturnTwoArgs", null, CharSequence.class, Collection.class); + MethodMatcher methodMatcher = MethodMatcherUtil.forStrictMethodSignature("noneReturnTwoArgs", null, CharSequence.class, Collection.class); Assertions.assertFalse(methodMatcher.test(noneReturnNoArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnOneArgs)); Assertions.assertTrue(methodMatcher.test(noneReturnTwoArgs2)); @@ -412,7 +412,7 @@ class MethodMatcherUtilsTest { Assertions.assertFalse(methodMatcher.test(returnOneArgs)); Assertions.assertFalse(methodMatcher.test(returnTwoArgs)); - methodMatcher = MethodMatcherUtils.forStrictMethodSignature("noneReturnTwoArgs", null, String.class, List.class); + methodMatcher = MethodMatcherUtil.forStrictMethodSignature("noneReturnTwoArgs", null, String.class, List.class); Assertions.assertFalse(methodMatcher.test(noneReturnNoArgs)); Assertions.assertTrue(methodMatcher.test(noneReturnTwoArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnTwoArgs2)); @@ -423,7 +423,7 @@ class MethodMatcherUtilsTest { @Test void forStrictMethodSignatureWithMethod() { - MethodMatcher methodMatcher = MethodMatcherUtils.forStrictMethodSignature(noneReturnTwoArgs); + MethodMatcher methodMatcher = MethodMatcherUtil.forStrictMethodSignature(noneReturnTwoArgs); Assertions.assertFalse(methodMatcher.test(noneReturnNoArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnOneArgs)); Assertions.assertTrue(methodMatcher.test(noneReturnTwoArgs)); @@ -431,7 +431,7 @@ class MethodMatcherUtilsTest { Assertions.assertFalse(methodMatcher.test(returnOneArgs)); Assertions.assertFalse(methodMatcher.test(returnTwoArgs)); - methodMatcher = MethodMatcherUtils.forStrictMethodSignature(returnTwoArgs); + methodMatcher = MethodMatcherUtil.forStrictMethodSignature(returnTwoArgs); Assertions.assertFalse(methodMatcher.test(noneReturnNoArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnOneArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnTwoArgs)); @@ -442,7 +442,7 @@ class MethodMatcherUtilsTest { @Test void forMethodSignatureWithMethod() { - MethodMatcher methodMatcher = MethodMatcherUtils.forMethodSignature(noneReturnTwoArgs2); + MethodMatcher methodMatcher = MethodMatcherUtil.forMethodSignature(noneReturnTwoArgs2); Assertions.assertFalse(methodMatcher.test(noneReturnNoArgs)); Assertions.assertFalse(methodMatcher.test(noneReturnOneArgs)); Assertions.assertTrue(methodMatcher.test(noneReturnTwoArgs)); @@ -454,7 +454,7 @@ class MethodMatcherUtilsTest { @Test void forMethodSignature() { - MethodMatcher methodMatcher = MethodMatcherUtils.forMethodSignature( + MethodMatcher methodMatcher = MethodMatcherUtil.forMethodSignature( "noneReturnTwoArgs", null, CharSequence.class, Collection.class ); Assertions.assertFalse(methodMatcher.test(noneReturnNoArgs)); @@ -470,17 +470,17 @@ class MethodMatcherUtilsTest { @SneakyThrows void forGetterMethodWithField() { Field nameField = Foo.class.getDeclaredField("name"); - MethodMatcher methodMatcher = MethodMatcherUtils.forGetterMethod(nameField); + MethodMatcher methodMatcher = MethodMatcherUtil.forGetterMethod(nameField); Method getName = Foo.class.getMethod("getName"); Assertions.assertTrue(methodMatcher.test(getName)); Field flagField = Foo.class.getDeclaredField("flag"); - methodMatcher = MethodMatcherUtils.forGetterMethod(flagField); + methodMatcher = MethodMatcherUtil.forGetterMethod(flagField); Method isFlag = Foo.class.getMethod("isFlag"); Assertions.assertTrue(methodMatcher.test(isFlag)); Field objectField = Foo.class.getDeclaredField("object"); - methodMatcher = MethodMatcherUtils.forGetterMethod(objectField); + methodMatcher = MethodMatcherUtil.forGetterMethod(objectField); Method object = Foo.class.getMethod("object"); Assertions.assertTrue(methodMatcher.test(object)); } @@ -488,15 +488,15 @@ class MethodMatcherUtilsTest { @Test @SneakyThrows void forGetterMethod() { - MethodMatcher methodMatcher = MethodMatcherUtils.forGetterMethod("name", String.class); + MethodMatcher methodMatcher = MethodMatcherUtil.forGetterMethod("name", String.class); Method getName = Foo.class.getMethod("getName"); Assertions.assertTrue(methodMatcher.test(getName)); - methodMatcher = MethodMatcherUtils.forGetterMethod("flag", boolean.class); + methodMatcher = MethodMatcherUtil.forGetterMethod("flag", boolean.class); Method isFlag = Foo.class.getMethod("isFlag"); Assertions.assertTrue(methodMatcher.test(isFlag)); - methodMatcher = MethodMatcherUtils.forGetterMethod("object", Object.class); + methodMatcher = MethodMatcherUtil.forGetterMethod("object", Object.class); Method object = Foo.class.getMethod("object"); Assertions.assertTrue(methodMatcher.test(object)); } @@ -505,17 +505,17 @@ class MethodMatcherUtilsTest { @SneakyThrows void forSetterMethodWithField() { Field nameField = Foo.class.getDeclaredField("name"); - MethodMatcher methodMatcher = MethodMatcherUtils.forSetterMethod(nameField); + MethodMatcher methodMatcher = MethodMatcherUtil.forSetterMethod(nameField); Method setName = Foo.class.getMethod("setName", String.class); Assertions.assertTrue(methodMatcher.test(setName)); Field flagField = Foo.class.getDeclaredField("flag"); - methodMatcher = MethodMatcherUtils.forSetterMethod(flagField); + methodMatcher = MethodMatcherUtil.forSetterMethod(flagField); Method setFlag = Foo.class.getMethod("setFlag", boolean.class); Assertions.assertTrue(methodMatcher.test(setFlag)); Field objectField = Foo.class.getDeclaredField("object"); - methodMatcher = MethodMatcherUtils.forSetterMethod(objectField); + methodMatcher = MethodMatcherUtil.forSetterMethod(objectField); Method object = Foo.class.getMethod("object", Object.class); Assertions.assertTrue(methodMatcher.test(object)); } @@ -523,15 +523,15 @@ class MethodMatcherUtilsTest { @Test @SneakyThrows void forSetterMethod() { - MethodMatcher methodMatcher = MethodMatcherUtils.forSetterMethod("name", String.class); + MethodMatcher methodMatcher = MethodMatcherUtil.forSetterMethod("name", String.class); Method setName = Foo.class.getMethod("setName", String.class); Assertions.assertTrue(methodMatcher.test(setName)); - methodMatcher = MethodMatcherUtils.forSetterMethod("flag", boolean.class); + methodMatcher = MethodMatcherUtil.forSetterMethod("flag", boolean.class); Method setFlag = Foo.class.getMethod("setFlag", boolean.class); Assertions.assertTrue(methodMatcher.test(setFlag)); - methodMatcher = MethodMatcherUtils.forSetterMethod("object", Object.class); + methodMatcher = MethodMatcherUtil.forSetterMethod("object", Object.class); Method object = Foo.class.getMethod("object", Object.class); Assertions.assertTrue(methodMatcher.test(object)); } @@ -539,7 +539,7 @@ class MethodMatcherUtilsTest { @Test @SneakyThrows void hasDeclaredAnnotation() { - MethodMatcher methodMatcher = MethodMatcherUtils.hasDeclaredAnnotation(GrandParentAnnotation.class); + MethodMatcher methodMatcher = MethodMatcherUtil.hasDeclaredAnnotation(GrandParentAnnotation.class); Assertions.assertFalse(methodMatcher.test(AnnotatedClass.class.getDeclaredMethod("annotatedByChildAnnotation"))); Assertions.assertFalse(methodMatcher.test(AnnotatedClass.class.getDeclaredMethod("annotatedByParentAnnotation"))); Assertions.assertTrue(methodMatcher.test(AnnotatedClass.class.getDeclaredMethod("annotatedByGrandParentAnnotation"))); @@ -549,13 +549,13 @@ class MethodMatcherUtilsTest { @Test @SneakyThrows void hasAnnotation() { - MethodMatcher methodMatcher = MethodMatcherUtils.hasAnnotation(GrandParentAnnotation.class); + MethodMatcher methodMatcher = MethodMatcherUtil.hasAnnotation(GrandParentAnnotation.class); Assertions.assertTrue(methodMatcher.test(AnnotatedClass.class.getDeclaredMethod("annotatedByChildAnnotation"))); Assertions.assertTrue(methodMatcher.test(AnnotatedClass.class.getDeclaredMethod("annotatedByParentAnnotation"))); Assertions.assertTrue(methodMatcher.test(AnnotatedClass.class.getDeclaredMethod("annotatedByGrandParentAnnotation"))); Assertions.assertFalse(methodMatcher.test(AnnotatedClass.class.getDeclaredMethod("noneAnnotated"))); - methodMatcher = MethodMatcherUtils.hasAnnotation(ParentAnnotation.class); + methodMatcher = MethodMatcherUtil.hasAnnotation(ParentAnnotation.class); Assertions.assertTrue(methodMatcher.test(AnnotatedClass.class.getDeclaredMethod("annotatedByChildAnnotation"))); Assertions.assertTrue(methodMatcher.test(AnnotatedClass.class.getDeclaredMethod("annotatedByParentAnnotation"))); Assertions.assertFalse(methodMatcher.test(AnnotatedClass.class.getDeclaredMethod("annotatedByGrandParentAnnotation"))); @@ -565,19 +565,19 @@ class MethodMatcherUtilsTest { @Test @SneakyThrows void hasAnnotationOnDeclaringClass() { - MethodMatcher methodMatcher = MethodMatcherUtils.hasAnnotationOnDeclaringClass(GrandParentAnnotation.class); + MethodMatcher methodMatcher = MethodMatcherUtil.hasAnnotationOnDeclaringClass(GrandParentAnnotation.class); Assertions.assertTrue(methodMatcher.test(AnnotatedClass.class.getDeclaredMethod("annotatedByChildAnnotation"))); Assertions.assertTrue(methodMatcher.test(AnnotatedClass.class.getDeclaredMethod("annotatedByParentAnnotation"))); Assertions.assertTrue(methodMatcher.test(AnnotatedClass.class.getDeclaredMethod("annotatedByGrandParentAnnotation"))); Assertions.assertTrue(methodMatcher.test(AnnotatedClass.class.getDeclaredMethod("noneAnnotated"))); - methodMatcher = MethodMatcherUtils.hasAnnotationOnDeclaringClass(ParentAnnotation.class); + methodMatcher = MethodMatcherUtil.hasAnnotationOnDeclaringClass(ParentAnnotation.class); Assertions.assertTrue(methodMatcher.test(AnnotatedClass.class.getDeclaredMethod("annotatedByChildAnnotation"))); Assertions.assertTrue(methodMatcher.test(AnnotatedClass.class.getDeclaredMethod("annotatedByParentAnnotation"))); Assertions.assertTrue(methodMatcher.test(AnnotatedClass.class.getDeclaredMethod("annotatedByGrandParentAnnotation"))); Assertions.assertTrue(methodMatcher.test(AnnotatedClass.class.getDeclaredMethod("noneAnnotated"))); - methodMatcher = MethodMatcherUtils.hasAnnotationOnDeclaringClass(ChildAnnotation.class); + methodMatcher = MethodMatcherUtil.hasAnnotationOnDeclaringClass(ChildAnnotation.class); Assertions.assertFalse(methodMatcher.test(AnnotatedClass.class.getDeclaredMethod("annotatedByChildAnnotation"))); Assertions.assertFalse(methodMatcher.test(AnnotatedClass.class.getDeclaredMethod("annotatedByParentAnnotation"))); Assertions.assertFalse(methodMatcher.test(AnnotatedClass.class.getDeclaredMethod("annotatedByGrandParentAnnotation"))); @@ -587,19 +587,19 @@ class MethodMatcherUtilsTest { @Test @SneakyThrows void hasAnnotationOnMethodOrDeclaringClass() { - MethodMatcher methodMatcher = MethodMatcherUtils.hasAnnotationOnMethodOrDeclaringClass(GrandParentAnnotation.class); + MethodMatcher methodMatcher = MethodMatcherUtil.hasAnnotationOnMethodOrDeclaringClass(GrandParentAnnotation.class); Assertions.assertTrue(methodMatcher.test(AnnotatedClass.class.getDeclaredMethod("annotatedByChildAnnotation"))); Assertions.assertTrue(methodMatcher.test(AnnotatedClass.class.getDeclaredMethod("annotatedByParentAnnotation"))); Assertions.assertTrue(methodMatcher.test(AnnotatedClass.class.getDeclaredMethod("annotatedByGrandParentAnnotation"))); Assertions.assertTrue(methodMatcher.test(AnnotatedClass.class.getDeclaredMethod("noneAnnotated"))); - methodMatcher = MethodMatcherUtils.hasAnnotationOnMethodOrDeclaringClass(ParentAnnotation.class); + methodMatcher = MethodMatcherUtil.hasAnnotationOnMethodOrDeclaringClass(ParentAnnotation.class); Assertions.assertTrue(methodMatcher.test(AnnotatedClass.class.getDeclaredMethod("annotatedByChildAnnotation"))); Assertions.assertTrue(methodMatcher.test(AnnotatedClass.class.getDeclaredMethod("annotatedByParentAnnotation"))); Assertions.assertTrue(methodMatcher.test(AnnotatedClass.class.getDeclaredMethod("annotatedByGrandParentAnnotation"))); Assertions.assertTrue(methodMatcher.test(AnnotatedClass.class.getDeclaredMethod("noneAnnotated"))); - methodMatcher = MethodMatcherUtils.hasAnnotationOnMethodOrDeclaringClass(ChildAnnotation.class); + methodMatcher = MethodMatcherUtil.hasAnnotationOnMethodOrDeclaringClass(ChildAnnotation.class); Assertions.assertTrue(methodMatcher.test(AnnotatedClass.class.getDeclaredMethod("annotatedByChildAnnotation"))); Assertions.assertFalse(methodMatcher.test(AnnotatedClass.class.getDeclaredMethod("annotatedByParentAnnotation"))); Assertions.assertFalse(methodMatcher.test(AnnotatedClass.class.getDeclaredMethod("annotatedByGrandParentAnnotation"))); diff --git a/hutool-core/src/test/java/org/dromara/hutool/core/reflect/method/MethodScannerTest.java b/hutool-core/src/test/java/org/dromara/hutool/core/reflect/method/MethodScannerTest.java index 4b85ded54..1a0229ef2 100644 --- a/hutool-core/src/test/java/org/dromara/hutool/core/reflect/method/MethodScannerTest.java +++ b/hutool-core/src/test/java/org/dromara/hutool/core/reflect/method/MethodScannerTest.java @@ -96,7 +96,7 @@ class MethodScannerTest { void testGetWithMetadataFromSpecificMethods() { // find first oneArgMethod method Method[] methods = MethodScanner.getMethods(Child.class); - Map.Entry actual = MethodScanner.getWithMetadataFromSpecificMethods(methods, MethodMatcherUtils.forName("oneArgMethod")); + Map.Entry actual = MethodScanner.getWithMetadataFromSpecificMethods(methods, MethodMatcherUtil.forName("oneArgMethod")); Assertions.assertNotNull(actual); Method expectedMethod = Parent.class.getDeclaredMethod("oneArgMethod", String.class); Assertions.assertEquals(expectedMethod, actual.getKey()); @@ -108,7 +108,7 @@ class MethodScannerTest { void testGetFromSpecificMethods() { // find first oneArgMethod method Method[] methods = MethodScanner.getMethods(Child.class); - Method actual = MethodScanner.getFromSpecificMethods(methods, MethodMatcherUtils.forName("oneArgMethod")); + Method actual = MethodScanner.getFromSpecificMethods(methods, MethodMatcherUtil.forName("oneArgMethod")); Method expectedMethod = Parent.class.getDeclaredMethod("oneArgMethod", String.class); Assertions.assertEquals(expectedMethod, actual); } diff --git a/hutool-core/src/test/java/org/dromara/hutool/core/util/TypeUtilTest.java b/hutool-core/src/test/java/org/dromara/hutool/core/util/TypeUtilTest.java index e90014a5f..f77b9a4ef 100644 --- a/hutool-core/src/test/java/org/dromara/hutool/core/util/TypeUtilTest.java +++ b/hutool-core/src/test/java/org/dromara/hutool/core/util/TypeUtilTest.java @@ -13,7 +13,7 @@ package org.dromara.hutool.core.util; import org.dromara.hutool.core.reflect.FieldUtil; -import org.dromara.hutool.core.reflect.MethodUtil; +import org.dromara.hutool.core.reflect.method.MethodUtil; import org.dromara.hutool.core.reflect.TypeUtil; import lombok.Data; import org.junit.jupiter.api.Assertions; diff --git a/hutool-cron/src/main/java/org/dromara/hutool/cron/task/InvokeTask.java b/hutool-cron/src/main/java/org/dromara/hutool/cron/task/InvokeTask.java index 6be136165..cc7882ab2 100644 --- a/hutool-cron/src/main/java/org/dromara/hutool/cron/task/InvokeTask.java +++ b/hutool-cron/src/main/java/org/dromara/hutool/cron/task/InvokeTask.java @@ -15,7 +15,7 @@ package org.dromara.hutool.cron.task; import org.dromara.hutool.core.classloader.ClassLoaderUtil; import org.dromara.hutool.core.exception.HutoolException; import org.dromara.hutool.core.reflect.ConstructorUtil; -import org.dromara.hutool.core.reflect.MethodUtil; +import org.dromara.hutool.core.reflect.method.MethodUtil; import org.dromara.hutool.core.text.StrUtil; import org.dromara.hutool.cron.CronException; diff --git a/hutool-db/src/main/java/org/dromara/hutool/db/Entity.java b/hutool-db/src/main/java/org/dromara/hutool/db/Entity.java index a25095d53..421cdacb7 100644 --- a/hutool-db/src/main/java/org/dromara/hutool/db/Entity.java +++ b/hutool-db/src/main/java/org/dromara/hutool/db/Entity.java @@ -16,7 +16,7 @@ import org.dromara.hutool.core.collection.CollUtil; import org.dromara.hutool.core.collection.set.SetUtil; import org.dromara.hutool.core.func.SerSupplier; import org.dromara.hutool.core.map.Dict; -import org.dromara.hutool.core.reflect.MethodUtil; +import org.dromara.hutool.core.reflect.method.MethodUtil; import org.dromara.hutool.core.text.StrUtil; import org.dromara.hutool.core.array.ArrayUtil; import org.dromara.hutool.core.util.CharsetUtil; diff --git a/hutool-db/src/main/java/org/dromara/hutool/db/handler/ResultSetUtil.java b/hutool-db/src/main/java/org/dromara/hutool/db/handler/ResultSetUtil.java index 791d46d63..57c28591a 100644 --- a/hutool-db/src/main/java/org/dromara/hutool/db/handler/ResultSetUtil.java +++ b/hutool-db/src/main/java/org/dromara/hutool/db/handler/ResultSetUtil.java @@ -17,7 +17,7 @@ import org.dromara.hutool.core.bean.PropDesc; import org.dromara.hutool.core.convert.Convert; import org.dromara.hutool.core.lang.Assert; import org.dromara.hutool.core.reflect.ConstructorUtil; -import org.dromara.hutool.core.reflect.MethodUtil; +import org.dromara.hutool.core.reflect.method.MethodUtil; import org.dromara.hutool.core.reflect.TypeUtil; import org.dromara.hutool.core.text.StrUtil; import org.dromara.hutool.core.array.ArrayUtil; diff --git a/hutool-json/src/main/java/org/dromara/hutool/json/mapper/JSONObjectMapper.java b/hutool-json/src/main/java/org/dromara/hutool/json/mapper/JSONObjectMapper.java index 357fb62c4..9315993cf 100644 --- a/hutool-json/src/main/java/org/dromara/hutool/json/mapper/JSONObjectMapper.java +++ b/hutool-json/src/main/java/org/dromara/hutool/json/mapper/JSONObjectMapper.java @@ -18,7 +18,7 @@ import org.dromara.hutool.core.bean.copier.CopyOptions; import org.dromara.hutool.core.convert.Convert; import org.dromara.hutool.core.io.IoUtil; import org.dromara.hutool.core.lang.mutable.MutableEntry; -import org.dromara.hutool.core.reflect.MethodUtil; +import org.dromara.hutool.core.reflect.method.MethodUtil; import org.dromara.hutool.core.text.StrUtil; import org.dromara.hutool.json.InternalJSONUtil; import org.dromara.hutool.json.JSONArray; diff --git a/hutool-poi/src/main/java/org/dromara/hutool/poi/excel/sax/Excel07SaxReader.java b/hutool-poi/src/main/java/org/dromara/hutool/poi/excel/sax/Excel07SaxReader.java index e58ab982b..9a60596c4 100644 --- a/hutool-poi/src/main/java/org/dromara/hutool/poi/excel/sax/Excel07SaxReader.java +++ b/hutool-poi/src/main/java/org/dromara/hutool/poi/excel/sax/Excel07SaxReader.java @@ -14,7 +14,7 @@ package org.dromara.hutool.poi.excel.sax; import org.dromara.hutool.core.io.IORuntimeException; import org.dromara.hutool.core.io.IoUtil; -import org.dromara.hutool.core.reflect.MethodUtil; +import org.dromara.hutool.core.reflect.method.MethodUtil; import org.dromara.hutool.core.text.StrUtil; import org.dromara.hutool.core.util.ObjUtil; import org.dromara.hutool.poi.excel.sax.handler.RowHandler;