Here you can find the source of getGetterMethods(Class> clazz)
public static List<Method> getGetterMethods(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 GETTER_METHOD_NAME_PATTERN = Pattern.compile("^get[A-Z]"); public static List<Method> getGetterMethods(Class<?> clazz) { List<Method> props = new ArrayList<Method>(); for (Method method : clazz.getMethods()) { String methodName = method.getName(); if (!methodName.equals("getClass") && GETTER_METHOD_NAME_PATTERN.matcher(methodName).find()) { props.add(method);// w ww . ja va 2 s.co m } } return props; } }