Class DefaultRmicAdapter
java.lang.Object
org.apache.tools.ant.taskdefs.rmic.DefaultRmicAdapter
- All Implemented Interfaces:
- RmicAdapter
- Direct Known Subclasses:
- ForkingSunRmic,- KaffeRmic,- SunRmic,- WLRmic
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 SummaryFieldsModifier and TypeFieldDescriptionstatic final Stringsuffix denoting a skel file: "_Skel"static final Stringsuffix denoting a stub file: "_Stub"static final Stringsuffix denoting a tie file: "_Tie"static final Stringarg for 1.1: "-v1.1"static final Stringarg for 1.2: "-v1.2"static final Stringarg for compat: "-vcompat"static final Stringoption for stub 1.1 in the rmic task: "1.1"static final Stringoption for stub 1.2 in the rmic task: "1.2"static final Stringoption for stub compat in the rmic task: "compat"
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected StringThis is an override point; get the stub version off the rmic command and translate that into a compiler-specific argumentprotected booleanWhether the iiop and idl switches are supported.protected String[]filterJvmCompilerArgs(String[] compilerArgs) Strip out all -J args from the command list.Gets the CLASSPATH this rmic process will use.protected PathBuilds the compilation classpath.This implementation returns a mapper that may return up to two file names.getRmic()Get the Rmic attributesprotected StringGets the skeleton class suffixprotected StringGets the stub class suffixprotected StringGets the tie class suffixprotected voidLogs the compilation parameters, adds the files to compile and logs the "niceSourceList"protected String[]preprocessCompilerArgs(String[] compilerArgs) Preprocess the compiler arguments in any way you see fit.voidSets Rmic attributesprotected CommandlineSetup rmic argument for rmic.protected CommandlinesetupRmicCommand(String[] options) Setup rmic argument for rmic.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.tools.ant.taskdefs.rmic.RmicAdapterexecute
- 
Field Details- 
RMI_STUB_SUFFIXsuffix denoting a stub file: "_Stub"- See Also:
 
- 
RMI_SKEL_SUFFIXsuffix denoting a skel file: "_Skel"- See Also:
 
- 
RMI_TIE_SUFFIXsuffix denoting a tie file: "_Tie"- See Also:
 
- 
STUB_COMPATarg for compat: "-vcompat"- See Also:
 
- 
STUB_1_1arg for 1.1: "-v1.1"- See Also:
 
- 
STUB_1_2arg for 1.2: "-v1.2"- See Also:
 
- 
STUB_OPTION_1_1option for stub 1.1 in the rmic task: "1.1"- See Also:
 
- 
STUB_OPTION_1_2option for stub 1.2 in the rmic task: "1.2"- See Also:
 
- 
STUB_OPTION_COMPAToption for stub compat in the rmic task: "compat"- See Also:
 
 
- 
- 
Constructor Details- 
DefaultRmicAdapterpublic DefaultRmicAdapter()
 
- 
- 
Method Details- 
setRmicSets Rmic attributes- Specified by:
- setRmicin interface- RmicAdapter
- Parameters:
- attributes- the rmic attributes
 
- 
getRmicGet the Rmic attributes- Returns:
- the attributes as a Rmic taskdef
 
- 
getStubClassSuffixGets the stub class suffix- Returns:
- the stub suffix "_Stub"
 
- 
getSkelClassSuffixGets the skeleton class suffix- Returns:
- the skeleton suffix "_Skel"
 
- 
getTieClassSuffixGets the tie class suffix- Returns:
- the tie suffix "_Tie"
 
- 
getMapperThis 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
 
- 
getClasspathGets the CLASSPATH this rmic process will use.- Specified by:
- getClasspathin interface- RmicAdapter
- Returns:
- the classpath
 
- 
getCompileClasspathBuilds 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
 
- 
setupRmicCommandSetup rmic argument for rmic.- Returns:
- the command line
 
- 
setupRmicCommandSetup rmic argument for rmic.- Parameters:
- options- additional parameters needed by a specific implementation.
- Returns:
- the command line
 
- 
addStubVersionOptionsThis 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
 
- 
preprocessCompilerArgsPreprocess 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.
 
- 
filterJvmCompilerArgsStrip 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.
 
- 
logAndAddFilesToCompileLogs the compilation parameters, adds the files to compile and logs the "niceSourceList"- Parameters:
- cmd- the commandline args
 
 
-