com.github.restup.bind.SimpleMethodArgumentFactory Maven / Gradle / Ivy
package com.github.restup.bind;
import com.github.restup.errors.Errors;
import com.github.restup.service.FilterChainContext;
import com.github.restup.util.ReflectionUtils;
/**
* Creates a new instance of method arguments using reflection. Does not bind request parameters to instantiated objects.
*/
public class SimpleMethodArgumentFactory implements MethodArgumentFactory {
@Override
public T newInstance(Class clazz) {
return ReflectionUtils.newInstance(clazz);
}
@Override
public T newInstance(Class clazz, FilterChainContext ctx, Errors errors) {
return newInstance(clazz);
}
}