@Test public void testShowRGB() throws Exception { colorUtil.showRGB(); }
public void showRGB() { if ("org.alien.reflection.load.demo.Red".equals(colorClass)) { Red red = new Red(); red.showRGB(); } if ("org.alien.reflection.load.demo.Blue".equals(colorClass)) { Blue blue = new Blue(); blue.showRGB(); } if ("org.alien.reflection.load.demo.Yellow".equals(colorClass)) { Yellow yellow = new Yellow(); yellow.showRGB(); } }
ColorUtil { public void showRGB() { if ("org.alien.reflection.load.demo.Red".equals(colorClass)) { Red red = new Red(); red.showRGB(); } if ("org.alien.reflection.load.demo.Blue".equals(colorClass)) { Blue blue = new Blue(); blue.showRGB(); } if ("org.alien.reflection.load.demo.Yellow".equals(colorClass)) { Yellow yellow = new Yellow(); yellow.showRGB(); } } }
ColorUtil { public void showRGB() { if ("org.alien.reflection.load.demo.Red".equals(colorClass)) { Red red = new Red(); red.showRGB(); } if ("org.alien.reflection.load.demo.Blue".equals(colorClass)) { Blue blue = new Blue(); blue.showRGB(); } if ("org.alien.reflection.load.demo.Yellow".equals(colorClass)) { Yellow yellow = new Yellow(); yellow.showRGB(); } } ColorUtil(String colorClass); }
ColorUtil { public void showRGB() { if ("org.alien.reflection.load.demo.Red".equals(colorClass)) { Red red = new Red(); red.showRGB(); } if ("org.alien.reflection.load.demo.Blue".equals(colorClass)) { Blue blue = new Blue(); blue.showRGB(); } if ("org.alien.reflection.load.demo.Yellow".equals(colorClass)) { Yellow yellow = new Yellow(); yellow.showRGB(); } } ColorUtil(String colorClass); void showRGB(); }
ColorUtil { public void showRGB() { if ("org.alien.reflection.load.demo.Red".equals(colorClass)) { Red red = new Red(); red.showRGB(); } if ("org.alien.reflection.load.demo.Blue".equals(colorClass)) { Blue blue = new Blue(); blue.showRGB(); } if ("org.alien.reflection.load.demo.Yellow".equals(colorClass)) { Yellow yellow = new Yellow(); yellow.showRGB(); } } ColorUtil(String colorClass); void showRGB();  }