List of usage examples for java.beans PropertyDescriptor setWriteMethod
public synchronized void setWriteMethod(Method writeMethod) throws IntrospectionException
From source file:org.wings.STransferHandler.java
private static PropertyDescriptor getPropertyDescriptor(String propertyName, Class<?> componentClass) { PropertyDescriptor descriptor = new PropertyDescriptor(); Method[] methods = componentClass.getMethods(); for (Method method : methods) { if (method.getName().equalsIgnoreCase("get" + propertyName)) { descriptor.setReadMethod(method); continue; }//from w w w. j av a2 s. co m if (method.getName().equalsIgnoreCase("set" + propertyName)) { descriptor.setWriteMethod(method); continue; } } return descriptor; }