All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.crane4j.extension.spring.SpringParameterNameFinder Maven / Gradle / Ivy

There is a newer version: 2.8.2
Show newest version
package cn.crane4j.extension.spring;

import cn.crane4j.core.support.ParameterNameFinder;
import lombok.RequiredArgsConstructor;
import org.springframework.core.ParameterNameDiscoverer;

import java.lang.reflect.Method;

/**
 * A {@link ParameterNameFinder} implementation based on Spring's {@link ParameterNameDiscoverer}.
 *
 * @author huangchengxing
 * @see ParameterNameDiscoverer
 */
@RequiredArgsConstructor
public class SpringParameterNameFinder implements ParameterNameFinder {

    private final ParameterNameDiscoverer parameterNameDiscoverer;

    @Override
    public String[] getParameterNames(Method method) {
        return parameterNameDiscoverer.getParameterNames(method);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy