if (mMappings != null) { AnnoBeanMapping[] mappings = new AnnoBeanMapping[mMappings.size()]; mMappings.toArray(mappings); mAnnogen.setMappings(mappings); }
  public void execute() throws BuildException {    if (mSrcDir == null) {      throw new BuildException("'srcDir' must be specified");    }    JamServiceFactory jsf = JamServiceFactory.getInstance();    JamServiceParams p = jsf.createServiceParams();    if (mToolpath != null) {     File[] tcp = path2files(mToolpath);      for(int i=0; i<tcp.length; i++) p.addToolClasspath(tcp[i]);    }    if (mClasspath != null) {     File[] cp = path2files(mClasspath);      for(int i=0; i<cp.length; i++) p.addClasspath(cp[i]);    }    p.includeSourcePattern(path2files(mSrcDir),mIncludes);    try {      JamService js = jsf.createService(p);      JClass[] classes = js.getAllClasses();      mAnnogen.addAnnotationClasses(classes);      log("Generating annotation impls for the following classes:");      for(int i=0; i<classes.length; i++) {        log("  "+classes[i].getQualifiedName());      }      mAnnogen.doCodegen();      log("...done.");    } catch(IOException ioe) {      throw new BuildException(ioe);    }  }