public void generate(BatchEnvironment env,ClassDoc inputClass,File destDir){
  RemoteClass remoteClass=RemoteClass.forClass(env,inputClass);
  if (remoteClass == null) {
    return;
  }
  StubSkeletonWriter writer=new StubSkeletonWriter(env,remoteClass,version);
  File stubFile=sourceFileForClass(writer.stubClassName(),destDir);
  try {
    IndentingWriter out=new IndentingWriter(new OutputStreamWriter(new FileOutputStream(stubFile)));
    writer.writeStub(out);
    out.close();
    if (env.verbose()) {
      env.output(Resources.getText("rmic.wrote",stubFile.getPath()));
    }
    env.addGeneratedFile(stubFile);
  }
 catch (  IOException e) {
    env.error("rmic.cant.write",stubFile.toString());
    return;
  }
  File skeletonFile=sourceFileForClass(writer.skeletonClassName(),destDir);
  if (version == StubVersion.V1_1 || version == StubVersion.VCOMPAT) {
    try {
      IndentingWriter out=new IndentingWriter(new OutputStreamWriter(new FileOutputStream(skeletonFile)));
      writer.writeSkeleton(out);
      out.close();
      if (env.verbose()) {
        env.output(Resources.getText("rmic.wrote",skeletonFile.getPath()));
      }
      env.addGeneratedFile(skeletonFile);
    }
 catch (    IOException e) {
      env.error("rmic.cant.write",skeletonFile.toString());
      return;
    }
  }
 else {
    File skeletonClassFile=classFileForClass(writer.skeletonClassName(),destDir);
    skeletonFile.delete();
    skeletonClassFile.delete();
  }
}

public void generate ( BatchEnvironment env , ClassDoc inputClass , File destDir ) { RemoteClass remoteClass = RemoteClass . forClass ( env , inputClass ) ; if ( remoteClass == null ) { return ; } StubSkeletonWriter writer = new StubSkeletonWriter ( env , remoteClass , version ) ; File stubFile = sourceFileForClass ( writer . stubClassName ( ) , destDir ) ; try { IndentingWriter out = new IndentingWriter ( new OutputStreamWriter ( new FileOutputStream ( stubFile ) ) ) ; writer . writeStub ( out ) ; out . close ( ) ; if ( env . verbose ( ) ) { env . output ( Resources . getText ( "rmic.wrote" , stubFile . getPath ( ) ) ) ; } env . addGeneratedFile ( stubFile ) ; } catch ( IOException e ) { env . error ( "rmic.cant.write" , stubFile . toString ( ) ) ; return ; } File skeletonFile = sourceFileForClass ( writer . skeletonClassName ( ) , destDir ) ; if ( version == StubVersion . V1_1 || version == StubVersion . VCOMPAT ) { try { IndentingWriter out = new IndentingWriter ( new OutputStreamWriter ( new FileOutputStream ( skeletonFile ) ) ) ; writer . writeSkeleton ( out ) ; out . close ( ) ; if ( env . verbose ( ) ) { env . output ( Resources . getText ( "rmic.wrote" , skeletonFile . getPath ( ) ) ) ; } env . addGeneratedFile ( skeletonFile ) ; } catch ( IOException e ) { env . error ( "rmic.cant.write" , skeletonFile . toString ( ) ) ; return ; } } else { File skeletonClassFile = classFileForClass ( writer . skeletonClassName ( ) , destDir ) ; skeletonFile . delete ( ) ; skeletonClassFile . delete ( ) ; } }
generates the source file ( s ) for the jrmp stub class and ( optionally ) skeleton class for the specified remote implementation class .
