List of usage examples for org.springframework.core MethodParameter MethodParameter
public MethodParameter(MethodParameter original)
From source file:org.springframework.beans.BeanUtils.java
/** * Obtain a new MethodParameter object for the write method of the * specified property./* w w w . j a va2s . co m*/ * @param pd the PropertyDescriptor for the property * @return a corresponding MethodParameter object */ public static MethodParameter getWriteMethodParameter(PropertyDescriptor pd) { if (pd instanceof GenericTypeAwarePropertyDescriptor) { return new MethodParameter(((GenericTypeAwarePropertyDescriptor) pd).getWriteMethodParameter()); } else { Method writeMethod = pd.getWriteMethod(); Assert.state(writeMethod != null, "No write method available"); return new MethodParameter(writeMethod, 0); } }