Package org.acplt.oncrpc.ant

# Class JrpcgenTask

java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.acplt.oncrpc.ant.JrpcgenTask

All Implemented Interfaces:
  `Cloneable`

public class JrpcgenTask extends org.apache.tools.ant.Task
Ant task to run the ONC/RPC '.x' file compiler provided in the Remote Tea library: jrpcgen.

The Remote Tea library is a complete open source implementation of the ONC/RPC standard, originally developed by the Chair of Process Control Engineering of University of Aachen, Germany.

Remote Tea can be found at https://sourceforge.net/projects/remotetea/.

The task attributes are:

- srcfile : '.x' file to compile (mandatory)
- destdir : directory where generated files need to be placed (mandatory). If a 'package' directive is used, do not add the package directories to destDir (it is done automatically by the task)
- package : package name to be used for generated files (optional)
- createdir : indicates whether jrpcgen must create destdir if it does not exist (optional). Defaults to no.
- verbose : indicates whether jrpcgen must be verbose (optional). Defaults to no.
- debug : indicates whether jrpcgen must trace debug information (optional). Defaults to no.
- backup : indicates whether jrpcgen must backup files (optional). Defaults to no.
- noClient : indicates whether jrpcgen shall skip the generation of the client stub (optional). Defaults to no.
- noServer : indicates whether jrpcgen shall skip the generation of the server stub (optional). Defaults to no.
- noXdr : indicates whether jrpcgen shall skip the generation of the XDR datatype classes (optional). Defaults to no.
- serverTcpOnly : indicates whether jrpcgen shall generate the server stub for the TCP transport, only (optional). Defaults to no.
- serverUdpOnly : indicates whether jrpcgen shall generate the server stub for the UDP transport, only (optional). Defaults to no.
- bean : indicates whether jrpcgen shall generate the XDR datatype classes with getters and setters for bean usage (optional). Setting this attribute to `true` implies setting the attribute `serializable` to `true` as well. Defaults to no.
- serializable : indicates whether jrpcgen shall tag the XDR datatype classes as serializable by adding the private static final field `serialVersionUID` (optional). Defaults to no.
- noValueCtor : indicates whether jrpcgen shall skip the generation of value constructors for the XDR datatype classes (optional). Defaults to no.
- noToString : indicates whether jrpcgen shall skip the generation of the `toString()` - methods for the XDR datatype classes (optional). Defaults to no.
- noEquals : indicates whether jrpcgen shall skip the generation of the `equals()` - and `hashCode()` - methods for the XDR datatype classes (optional). Defaults to no.
- noEnum : indicates whether jrpcgen shall fall back to Java interfaces instead of Java enumerations as mapping for enumerations specified in an x-file (optional). Defaults to no.
- initStrings : indicates whether jrpcgen shall intialize string fields with an empty string instead of `null` (optional). Defaults to no.
- noClamp : indicates whether generated client calls shall get the version from the client instance instead of getting a hard coded value referring to the version number specified in the x-file (optional). Defaults to no.
- withCallInfo : indicates whether the generated server stub methods shall get the ONC/RPC call information as first parameter (optional). Defaults to no.

Author:
  Jean-Francois Daune, Harald Wirths <hwirths@nde.ag>

## Field Summary

### Fields inherited from class org.apache.tools.ant.Task

`target, taskName, taskType, wrapper`

### Fields inherited from class org.apache.tools.ant.ProjectComponent

`description, location, project`

## Constructor Summary

Constructors
Constructor
Description
`JrpcgenTask()`

## Method Summary

Modifier and Type
Method
Description
`void`
`execute()`
`void`
`setBackup(boolean backup)`
`void`
`setBean(boolean bean)`
`void`
`setCreatedir(boolean createDir)`
`void`
`setDebug(boolean debug)`
`void`
`setDestdir(File destDir)`
`void`
`setInitStrings(boolean initStrings)`
`void`
`setNoClamp(boolean noClamp)`
`void`
`setNoClient(boolean noClient)`
`void`
`setNoEnum(boolean noEnum)`
`void`
`setNoEquals(boolean noEquals)`
`void`
`setNoServer(boolean noServer)`
`void`
`setNoToString(boolean noToString)`
`void`
`setNoValueCtor(boolean noValueCtor)`
`void`
`setNoXdr(boolean noXdr)`
`void`
`setPackage(String packageName)`
`void`
`setSerializable(boolean serializable)`
`void`
`setServerTcpOnly(boolean serverTcpOnly)`
`void`
`setServerUdpOnly(boolean serverUdpOnly)`
`void`
`setSrcfile(File srcFile)`
`void`
`setVerbose(boolean verbose)`
`void`
`setWithCallInfo(boolean withCallInfo)`

### Methods inherited from class org.apache.tools.ant.Task

`bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType`

### Methods inherited from class org.apache.tools.ant.ProjectComponent

`clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject`

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

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

## Constructor Details

### JrpcgenTask

public JrpcgenTask()

## Method Details

### setSrcfile

public void setSrcfile(File srcFile)

### setDestdir

public void setDestdir(File destDir)

### setPackage

public void setPackage(String packageName)

### setCreatedir

public void setCreatedir(boolean createDir)

### setDebug

public void setDebug(boolean debug)

### setVerbose

public void setVerbose(boolean verbose)

### setBackup

public void setBackup(boolean backup)

### setNoClient

public void setNoClient(boolean noClient)

### setNoServer

public void setNoServer(boolean noServer)

### setNoXdr

public void setNoXdr(boolean noXdr)

### setServerTcpOnly

public void setServerTcpOnly(boolean serverTcpOnly)

### setServerUdpOnly

public void setServerUdpOnly(boolean serverUdpOnly)

### setBean

public void setBean(boolean bean)

### setSerializable

public void setSerializable(boolean serializable)

### setNoValueCtor

public void setNoValueCtor(boolean noValueCtor)

### setNoToString

public void setNoToString(boolean noToString)

### setNoEquals

public void setNoEquals(boolean noEquals)

### setNoEnum

public void setNoEnum(boolean noEnum)

### setInitStrings

public void setInitStrings(boolean initStrings)

### setNoClamp

public void setNoClamp(boolean noClamp)

### setWithCallInfo

public void setWithCallInfo(boolean withCallInfo)

### execute

public void execute() throws org.apache.tools.ant.BuildException

Overrides:
  `execute` in class `org.apache.tools.ant.Task`
Throws:
  `org.apache.tools.ant.BuildException`