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
trueimplies setting the attributeserializabletotrueas 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()- andhashCode()- 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, wrapperFields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()voidsetBackup(boolean backup) voidsetBean(boolean bean) voidsetCreatedir(boolean createDir) voidsetDebug(boolean debug) voidsetDestdir(File destDir) voidsetInitStrings(boolean initStrings) voidsetNoClamp(boolean noClamp) voidsetNoClient(boolean noClient) voidsetNoEnum(boolean noEnum) voidsetNoEquals(boolean noEquals) voidsetNoServer(boolean noServer) voidsetNoToString(boolean noToString) voidsetNoValueCtor(boolean noValueCtor) voidsetNoXdr(boolean noXdr) voidsetPackage(String packageName) voidsetSerializable(boolean serializable) voidsetServerTcpOnly(boolean serverTcpOnly) voidsetServerUdpOnly(boolean serverUdpOnly) voidsetSrcfile(File srcFile) voidsetVerbose(boolean verbose) voidsetWithCallInfo(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, setTaskTypeMethods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
-
Constructor Details
-
JrpcgenTask
public JrpcgenTask()
-
-
Method Details
-
setSrcfile
-
setDestdir
-
setPackage
-
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:
executein classorg.apache.tools.ant.Task- Throws:
org.apache.tools.ant.BuildException
-