All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.darwinsys.reflection.ReflectionUtils Maven / Gradle / Ivy

There is a newer version: 1.8.0
Show newest version
package com.darwinsys.reflection;

import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;

/**
 * Get the Constructors and methods
 * @author Ian F. Darwin, http://www.darwinsys.com/
 */
public class ReflectionUtils {

	public List getSetters(String cName) throws ClassNotFoundException {
		Class c = Class.forName(cName);
		Method[] meths = c.getMethods();
		List list = new ArrayList();
		for (Method m : meths) {
			if (m.getName().startsWith("set")) {
				list.add(m);
			}
		}
		return list;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy