Android examples for java.lang.reflect:Method Get
get Static Methods from a Class
//package com.java2s; 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> getStaticMethods(Class<?> clazz) { List<Method> methods = new ArrayList<Method>(); for (Method method : clazz.getMethods()) { if (Modifier.isStatic(method.getModifiers())) { methods.add(method);/*from w w w. ja v a 2 s . co m*/ } } return Collections.unmodifiableList(methods); } }