Class DefaultRmicAdapter
- java.lang.Object
- 
- org.apache.tools.ant.taskdefs.rmic.DefaultRmicAdapter
 
- 
- All Implemented Interfaces:
- RmicAdapter
 - Direct Known 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 DefaultCompilerAdapter.- Since:
- Ant 1.4
 
- 
- 
Field SummaryFields Modifier and Type Field Description static java.lang.StringRMI_SKEL_SUFFIXsuffix denoting a skel file: "_Skel"static java.lang.StringRMI_STUB_SUFFIXsuffix denoting a stub file: "_Stub"static java.lang.StringRMI_TIE_SUFFIXsuffix denoting a tie file: "_Tie"static java.lang.StringSTUB_1_1arg for 1.1: "-v1.1"static java.lang.StringSTUB_1_2arg for 1.2: "-v1.2"static java.lang.StringSTUB_COMPATarg for compat: "-vcompat"static java.lang.StringSTUB_OPTION_1_1option for stub 1.1 in the rmic task: "1.1"static java.lang.StringSTUB_OPTION_1_2option for stub 1.2 in the rmic task: "1.2"static java.lang.StringSTUB_OPTION_COMPAToption for stub compat in the rmic task: "compat"
 - 
Constructor SummaryConstructors Constructor Description DefaultRmicAdapter()
 - 
Method SummaryModifier and Type Method Description protected java.lang.StringaddStubVersionOptions()This is an override point; get the stub version off the rmic command and translate that into a compiler-specific argumentprotected booleanareIiopAndIdlSupported()Whether the iiop and idl switches are supported.protected java.lang.String[]filterJvmCompilerArgs(java.lang.String[] compilerArgs)Strip out all -J args from the command list.PathgetClasspath()Gets the CLASSPATH this rmic process will use.protected PathgetCompileClasspath()Builds the compilation classpath.FileNameMappergetMapper()This implementation returns a mapper that may return up to two file names.RmicgetRmic()Get the Rmic attributesprotected java.lang.StringgetSkelClassSuffix()Gets the skeleton class suffixprotected java.lang.StringgetStubClassSuffix()Gets the stub class suffixprotected java.lang.StringgetTieClassSuffix()Gets the tie class suffixprotected voidlogAndAddFilesToCompile(Commandline cmd)Logs the compilation parameters, adds the files to compile and logs the "niceSourceList"protected java.lang.String[]preprocessCompilerArgs(java.lang.String[] compilerArgs)Preprocess the compiler arguments in any way you see fit.voidsetRmic(Rmic attributes)Sets Rmic attributesprotected CommandlinesetupRmicCommand()Setup rmic argument for rmic.protected CommandlinesetupRmicCommand(java.lang.String[] options)Setup rmic argument for rmic.- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.apache.tools.ant.taskdefs.rmic.RmicAdapterexecute
 
- 
 
- 
- 
- 
Field Detail- 
RMI_STUB_SUFFIXpublic static final java.lang.String RMI_STUB_SUFFIX suffix denoting a stub file: "_Stub"- See Also:
- Constant Field Values
 
 - 
RMI_SKEL_SUFFIXpublic static final java.lang.String RMI_SKEL_SUFFIX suffix denoting a skel file: "_Skel"- See Also:
- Constant Field Values
 
 - 
RMI_TIE_SUFFIXpublic static final java.lang.String RMI_TIE_SUFFIX suffix denoting a tie file: "_Tie"- See Also:
- Constant Field Values
 
 - 
STUB_COMPATpublic static final java.lang.String STUB_COMPAT arg for compat: "-vcompat"- See Also:
- Constant Field Values
 
 - 
STUB_1_1public static final java.lang.String STUB_1_1 arg for 1.1: "-v1.1"- See Also:
- Constant Field Values
 
 - 
STUB_1_2public static final java.lang.String STUB_1_2 arg for 1.2: "-v1.2"- See Also:
- Constant Field Values
 
 - 
STUB_OPTION_1_1public static final java.lang.String STUB_OPTION_1_1 option for stub 1.1 in the rmic task: "1.1"- See Also:
- Constant Field Values
 
 - 
STUB_OPTION_1_2public static final java.lang.String STUB_OPTION_1_2 option for stub 1.2 in the rmic task: "1.2"- See Also:
- Constant Field Values
 
 - 
STUB_OPTION_COMPATpublic static final java.lang.String STUB_OPTION_COMPAT option for stub compat in the rmic task: "compat"- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
setRmicpublic void setRmic(Rmic attributes) Sets Rmic attributes- Specified by:
- setRmicin interface- RmicAdapter
- Parameters:
- attributes- the rmic attributes
 
 - 
getRmicpublic Rmic getRmic() Get the Rmic attributes- Returns:
- the attributes as a Rmic taskdef
 
 - 
getStubClassSuffixprotected java.lang.String getStubClassSuffix() Gets the stub class suffix- Returns:
- the stub suffix "_Stub"
 
 - 
getSkelClassSuffixprotected java.lang.String getSkelClassSuffix() Gets the skeleton class suffix- Returns:
- the skeleton suffix "_Skel"
 
 - 
getTieClassSuffixprotected java.lang.String getTieClassSuffix() Gets the tie class suffix- Returns:
- the tie suffix "_Tie"
 
 - 
getMapperpublic 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:
- getMapperin interface- RmicAdapter
- Returns:
- a FileNameMapper
 
 - 
getClasspathpublic Path getClasspath() Gets the CLASSPATH this rmic process will use.- Specified by:
- getClasspathin interface- RmicAdapter
- Returns:
- the classpath
 
 - 
getCompileClasspathprotected Path getCompileClasspath() Builds the compilation classpath.- Returns:
- the classpath
 
 - 
areIiopAndIdlSupportedprotected boolean areIiopAndIdlSupported() Whether the iiop and idl switches are supported.This implementation returns false if running on Java 11 onwards and true otherwise. - Returns:
- true if the iiop and idl switches are supported
- Since:
- Ant 1.10.3
 
 - 
setupRmicCommandprotected Commandline setupRmicCommand() Setup rmic argument for rmic.- Returns:
- the command line
 
 - 
setupRmicCommandprotected Commandline setupRmicCommand(java.lang.String[] options) Setup rmic argument for rmic.- Parameters:
- options- additional parameters needed by a specific implementation.
- Returns:
- the command line
 
 - 
addStubVersionOptionsprotected java.lang.String addStubVersionOptions() This is an override point; get the stub version off the rmic command and translate that into a compiler-specific argument- Returns:
- a string to use for the stub version; can be null
- Since:
- Ant1.7.1
 
 - 
preprocessCompilerArgsprotected java.lang.String[] preprocessCompilerArgs(java.lang.String[] compilerArgs) Preprocess the compiler arguments in any way you see fit. This is to allow compiler adapters to validate or filter the arguments. The base implementation returns the original compiler arguments unchanged.- Parameters:
- compilerArgs- the original compiler arguments
- Returns:
- the filtered set.
 
 - 
filterJvmCompilerArgsprotected java.lang.String[] filterJvmCompilerArgs(java.lang.String[] compilerArgs) Strip out all -J args from the command list. Invoke this frompreprocessCompilerArgs(String[])if you have a non-forking compiler.- Parameters:
- compilerArgs- the original compiler arguments
- Returns:
- the filtered set.
 
 - 
logAndAddFilesToCompileprotected void logAndAddFilesToCompile(Commandline cmd) Logs the compilation parameters, adds the files to compile and logs the "niceSourceList"- Parameters:
- cmd- the commandline args
 
 
- 
 
-