Package org.acplt.oncrpc.apps.jrpcgen

# Class jrpcgen

java.lang.Object
org.acplt.oncrpc.apps.jrpcgen.jrpcgen

public class jrpcgen extends Object
The class `jrpcgen` implements a Java-based rpcgen RPC protocol compiler. jrpcgen is a Java-based tool that generates source code of Java classes to implement an RPC protocol. The input to jrpcgen is a language similiar to C (but more probably much more similiar to FORTRAN) known as the RPC language (Remote Procedure Call Language).

Version:
  $Revision: 1.6 $ $Date: 2007/05/29 19:38:30 $ $State: Exp $ $Locker: $
Author:
  Harald Albrecht

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`PARAMS_MORE`
A remote procedure expects more than one parameter and thus needs an XDR wrapping class.
`static final int`
`PARAMS_SINGLE`
A remote procedure expects only a single parameter, which is a complex type (class).
`static final int`
`PARAMS_SINGLE_BASETYPE`
A remote procedure expects only a single parameter, which is of a base type, like integer, boolean, string, et cetera.
`static final int`
`PARAMS_VOID`
A remote procedure has no parameters and thus needs to use the XDR void wrapper class as a dummy.
`static final String`
`VERSION`
Current version of jrpcgen.

## Constructor Summary

Constructors
Constructor
Description
`jrpcgen(JrpcgenContext context)`

## Method Summary

Modifier and Type
Method
Description
`JrpcgenContext`
`context()`
`JrpcgenModule`
`doParse()`
The real parsing and code generation part.
`static void`
`main(String[] args)`
The main part of jrpcgen where all things start.
`JrpcgenOptions`
`options()`
`static void`
`printHelp(PrintStream out)`
`void`
`reset()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### VERSION

public static final String VERSION
Current version of jrpcgen.

See Also:
  - Constant Field Values

### PARAMS_VOID

public static final int PARAMS_VOID
A remote procedure has no parameters and thus needs to use the XDR void wrapper class as a dummy.

See Also:
  - Constant Field Values

### PARAMS_SINGLE

public static final int PARAMS_SINGLE
A remote procedure expects only a single parameter, which is a complex type (class).

See Also:
  - Constant Field Values

### PARAMS_SINGLE_BASETYPE

public static final int PARAMS_SINGLE_BASETYPE
A remote procedure expects only a single parameter, which is of a base type, like integer, boolean, string, et cetera.

See Also:
  - Constant Field Values

### PARAMS_MORE

public static final int PARAMS_MORE
A remote procedure expects more than one parameter and thus needs an XDR wrapping class.

See Also:
  - Constant Field Values

## Constructor Details

### jrpcgen

public jrpcgen(JrpcgenContext context)

## Method Details

### main

public static void main(String[] args)
The main part of jrpcgen where all things start.

Parameters:
  `args` - A string array containing the command line arguments passed on invocation.

### printHelp

public static void printHelp(PrintStream out)

### reset

public void reset()

### context

public JrpcgenContext context()

### options

public JrpcgenOptions options()

### doParse

public JrpcgenModule doParse() throws FileNotFoundException, Exception
The real parsing and code generation part. This has been factored out of main() in order to make it available as an Ant task.

Throws:
  `FileNotFoundException` - if the specified x-file does not exist or cannot be opened for reading.
  `Exception` - if any kind of error like a parser error occurs.