Code example for Method

Methods: getAnnotationgetName

0
 
  @Override 
  public boolean visit(FlaggedCommand x) {
    out = detailLevel;
    Method method = x.getMethod();
    Command cmd = method.getAnnotation(Command.class);
    // Skip hidden commands 
    if (!cmd.displayed() && !showHidden) {
      return false; 
    } 
    out.println();
    out.println("%s : %s", method.getName(), cmd.help());
    currentCommand = x;
 
    return true; 
  } 
}