Here you can find the source of getGetterMethodNames(Object o)
public static List<String> getGetterMethodNames(Object o)
//package com.java2s; //License from project: Apache License import java.lang.reflect.Method; import java.util.ArrayList; import java.util.List; public class Main { private static final String GET_ROOT = "get"; private static final String IS_ROOT = "is"; public static List<String> getGetterMethodNames(Object o) { List<String> methodNames = new ArrayList<>(); for (Method m : o.getClass().getMethods()) { if (m.getName().startsWith(GET_ROOT) || m.getName().startsWith(IS_ROOT)) { methodNames.add(m.getName()); }//from ww w .j av a 2 s .c o m } return methodNames; } }