Class ForkingSunRmic
java.lang.Object
org.apache.tools.ant.taskdefs.rmic.DefaultRmicAdapter
org.apache.tools.ant.taskdefs.rmic.ForkingSunRmic
- All Implemented Interfaces:
RmicAdapter
- Direct Known Subclasses:
XNewRmic
This is an extension of the sun rmic compiler, which forks rather than
executes it inline. Why so? Because rmic is dog slow, but if you fork the
compiler you can have multiple copies compiling different bits of your project
at the same time. Which, on a multi-cpu system results in significant speedups.
Also, Java1.6 behaves oddly with -XNew, so we switch it on here if needed.
- Since:
- ant1.7
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringthe name of this adapter for users to selectFields inherited from class DefaultRmicAdapter
RMI_SKEL_SUFFIX, RMI_STUB_SUFFIX, RMI_TIE_SUFFIX, STUB_1_1, STUB_1_2, STUB_COMPAT, STUB_OPTION_1_1, STUB_OPTION_1_2, STUB_OPTION_COMPATModifier 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 Summary
Constructors -
Method Summary
Methods inherited from class DefaultRmicAdapter
addStubVersionOptions, filterJvmCompilerArgs, getClasspath, getCompileClasspath, getMapper, getRmic, getSkelClassSuffix, getStubClassSuffix, getTieClassSuffix, logAndAddFilesToCompile, preprocessCompilerArgs, setRmic, setupRmicCommand, setupRmicCommandModifier and TypeMethodDescriptionprotected StringThis is an override point; get the stub version off the rmic command and translate that into a compiler-specific argumentprotected 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.
-
Field Details
-
COMPILER_NAME
-
-
Constructor Details
-
ForkingSunRmic
public ForkingSunRmic()
-
-
Method Details
-
areIiopAndIdlSupported
protected boolean areIiopAndIdlSupported()Description copied from class:DefaultRmicAdapterWhether the iiop and idl switches are supported.This implementation returns false if running on Java 11 onwards and true otherwise.
- Overrides:
areIiopAndIdlSupportedin classDefaultRmicAdapter- Returns:
- true if the iiop and idl switches are supported
- Since:
- Ant 1.10.3
-
execute
exec by creating a new command- Returns:
- true if the command ran successfully
- Throws:
BuildException- on error
-
getExecutableName
-