Here you can find the source of getSetterMethods(Class> clazz)
public static List<Method> getSetterMethods(Class<?> clazz)
//package com.java2s; //License from project: Apache License import java.lang.reflect.Method; import java.util.ArrayList; import java.util.List; import java.util.regex.Pattern; public class Main { private static final Pattern SETTER_METHOD_NAME_PATTERN = Pattern.compile("^set[A-Z]"); public static List<Method> getSetterMethods(Class<?> clazz) { List<Method> props = new ArrayList<Method>(); for (Method method : clazz.getMethods()) { String methodName = method.getName(); if (SETTER_METHOD_NAME_PATTERN.matcher(methodName).find() && method.getParameterTypes().length == 1) { props.add(method);/*from www .jav a2s . c o m*/ } } return props; } }