org.apache.tools.ant.taskdefs.rmic

Class DefaultRmicAdapter

Implemented Interfaces:
RmicAdapter
Known Direct Subclasses:
ForkingSunRmic, KaffeRmic, SunRmic, WLRmic

public abstract class DefaultRmicAdapter
extends java.lang.Object
implements RmicAdapter

This is the default implementation for the RmicAdapter interface. Currently, this is a cut-and-paste of the original rmic task and DefaultCopmpilerAdapter.
Since:
Ant 1.4

Field Summary

static String
RMI_SKEL_SUFFIX
suffix denoting a skel file
static String
RMI_STUB_SUFFIX
suffix denoting a stub file
static String
RMI_TIE_SUFFIX
suffix denoting a tie file
static String
STUB_1_1
arg for 1.1
static String
STUB_1_2
arg for 1.2
static String
STUB_COMPAT
arg for compat

Constructor Summary

DefaultRmicAdapter()
Default constructor

Method Summary

Path
getClasspath()
Gets the CLASSPATH this rmic process will use.
protected Path
getCompileClasspath()
Builds the compilation classpath.
FileNameMapper
getMapper()
This implementation returns a mapper that may return up to two file names.
Rmic
getRmic()
Get the Rmic attributes
protected String
getSkelClassSuffix()
Gets the skeleton class suffix
protected String
getStubClassSuffix()
Gets the stub class suffix
protected String
getTieClassSuffix()
Gets the tie class suffix
protected void
logAndAddFilesToCompile(Commandline cmd)
Logs the compilation parameters, adds the files to compile and logs the "niceSourceList"
void
setRmic(Rmic attributes)
Sets Rmic attributes
protected Commandline
setupRmicCommand()
Setup rmic argument for rmic.
protected Commandline
setupRmicCommand(String[] options)
Setup rmic argument for rmic.

Field Details

RMI_SKEL_SUFFIX

public static final String RMI_SKEL_SUFFIX
suffix denoting a skel file

RMI_STUB_SUFFIX

public static final String RMI_STUB_SUFFIX
suffix denoting a stub file

RMI_TIE_SUFFIX

public static final String RMI_TIE_SUFFIX
suffix denoting a tie file

STUB_1_1

public static final String STUB_1_1
arg for 1.1

STUB_1_2

public static final String STUB_1_2
arg for 1.2

STUB_COMPAT

public static final String STUB_COMPAT
arg for compat

Constructor Details

DefaultRmicAdapter

public DefaultRmicAdapter()
Default constructor

Method Details

getClasspath

public Path getClasspath()
Gets the CLASSPATH this rmic process will use.
Specified by:
getClasspath in interface RmicAdapter
Returns:
the classpath

getCompileClasspath

protected Path getCompileClasspath()
Builds the compilation classpath.
Returns:
the classpath

getMapper

public FileNameMapper getMapper()
This implementation returns a mapper that may return up to two file names.
  • for JRMP it will return *_getStubClassSuffix (and *_getSkelClassSuffix if JDK 1.1 is used)
  • for IDL it will return a random name, causing <rmic> to always recompile.
  • for IIOP it will return _*_getStubClassSuffix for interfaces and _*_getStubClassSuffix for non-interfaces (and determine the interface and create _*_Stub from that).
Specified by:
getMapper in interface RmicAdapter
Returns:
a FileNameMapper

getRmic

public Rmic getRmic()
Get the Rmic attributes
Returns:
the attributes as a Rmic taskdef

getSkelClassSuffix

protected String getSkelClassSuffix()
Gets the skeleton class suffix
Returns:
the skeleton suffix "_Skel"

getStubClassSuffix

protected String getStubClassSuffix()
Gets the stub class suffix
Returns:
the stub suffix "_Stub"

getTieClassSuffix

protected String getTieClassSuffix()
Gets the tie class suffix
Returns:
the tie suffix "_Tie"

logAndAddFilesToCompile

protected void logAndAddFilesToCompile(Commandline cmd)
Logs the compilation parameters, adds the files to compile and logs the "niceSourceList"
Parameters:
cmd - the commandline args

setRmic

public void setRmic(Rmic attributes)
Sets Rmic attributes
Specified by:
setRmic in interface RmicAdapter
Parameters:
attributes - the rmic attributes

setupRmicCommand

protected Commandline setupRmicCommand()
Setup rmic argument for rmic.
Returns:
the command line

setupRmicCommand

protected Commandline setupRmicCommand(String[] options)
Setup rmic argument for rmic.
Parameters:
options - additional parameters needed by a specific implementation.
Returns:
the command line