Method[] m = c.getDeclaredMethods();
for(int j=0; j<m.length ; j++)
{
System.out.println("Methode : "+m[j].getName());
Menu menu = m[j].getAnnotation(Menu.class);
if(menu != null)
{
JMenuItem item;
if(menu.libelle() == null)
{
item = new JMenuItem(m[j].getName());
}
else
{
item = new JMenuItem(menu.libelle());
}
plugin.add(item);
item.addActionListener(new ActionListener() {
@Override