private <T> T setterInjection(T instance, BeanDefineParam prop, BeanDefine def, Object param) {
Method method = prop.getMethod();
if (method == null) {
Class<?> p = param != null ? param.getClass() : null;
method = ClassUtils.searchMethod(def.getType(), prop.getName(), p);
if (method == null) throw new ClassUtilsException("method is null. [" + prop.getName() + ":" + param + "] in " + instance);
}
ClassUtils.invoke(method, instance, param);
//Regist method cache.
prop.setMethod(method);
return instance;