blob: 3c3ee1653ef2a76838f4409f53e9bcda431da472 [file] [log] [blame]
Stuart McCullochbb014372012-06-07 21:57:32 +00001package aQute.bnd.build;
2
3import java.lang.reflect.*;
4
5import aQute.bnd.service.action.*;
6
7public class ReflectAction implements Action {
Stuart McCulloch2286f232012-06-15 13:27:53 +00008 String what;
Stuart McCullochbb014372012-06-07 21:57:32 +00009
Stuart McCulloch2286f232012-06-15 13:27:53 +000010 public ReflectAction(String what) {
11 this.what = what;
12 }
13
14 public void execute(Project project, String action) throws Exception {
15 Method m = project.getClass().getMethod(what);
16 m.invoke(project);
17 }
18
19 public String toString() {
20 return "ra:" + what;
21 }
Stuart McCullochbb014372012-06-07 21:57:32 +000022}