Here you can find the source of getSetterMethods(Class> clazz)
public static List<Method> getSetterMethods(Class<?> clazz)
//package com.java2s; /*// www. j a v a2 s. co m Copyright (c) 2009-2011, AOL Inc. All rights reserved. This code is licensed under a BSD license. Howard Uman */ import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class Main { public static List<Method> getSetterMethods(Class<?> clazz) { Method[] methods = clazz.getMethods(); ArrayList<Method> setterMethods = new ArrayList<Method>(methods.length); for (Method method : methods) { // remove: // non-public methods // methods with not-1 parameters // methods that do not begin with the "set" convention if (!Modifier.isPublic(method.getModifiers()) || (method.getParameterTypes().length != 1) || !method.getName().startsWith("set")) { continue; } setterMethods.add(method); } return Collections.unmodifiableList(setterMethods); } }