Here you can find the source of getSetterMethods(Class> clazz)
public static Method[] getSetterMethods(Class<?> clazz)
//package com.java2s; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.List; public class Main { public static Method[] getSetterMethods(Class<?> clazz) { if (clazz == null) { return new Method[] {}; }//w w w. j a v a 2s. c o m Method[] methods = clazz.getMethods(); List<Method> mlist = new ArrayList<Method>(); for (int i = 0; i < methods.length; i++) { Method method = methods[i]; String methodName = method.getName(); if (methodName.startsWith("set")) { //$NON-NLS-1$ mlist.add(method); } } return mlist.toArray(new Method[] {}); } }