XNewRmic (Apache Ant API)
Description: declaration: package: org.apache.tools.ant.taskdefs.rmic, class: XNewRmic

# Class XNewRmic

java.lang.Object
org.apache.tools.ant.taskdefs.rmic.DefaultRmicAdapter
org.apache.tools.ant.taskdefs.rmic.ForkingSunRmic
org.apache.tools.ant.taskdefs.rmic.XNewRmic

All Implemented Interfaces:
  `RmicAdapter`

public class XNewRmic extends ForkingSunRmic
Run rmic in a new process with -Xnew set. This switches rmic to use a new compiler, one that doesn't work in-process on ant on java1.6. see: https://issues.apache.org/bugzilla/show_bug.cgi?id=38732

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `COMPILER_NAME`
  the name of this adapter for users to select

  ### Fields 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_COMPAT`
  Modifier and Type
  Field
  Description
  `static final String`
  `RMI_SKEL_SUFFIX`
  suffix denoting a skel file: "_Skel"
  `static final String`
  `RMI_STUB_SUFFIX`
  suffix denoting a stub file: "_Stub"
  `static final String`
  `RMI_TIE_SUFFIX`
  suffix denoting a tie file: "_Tie"
  `static final String`
  `STUB_1_1`
  arg for 1.1: "-v1.1"
  `static final String`
  `STUB_1_2`
  arg for 1.2: "-v1.2"
  `static final String`
  `STUB_COMPAT`
  arg for compat: "-vcompat"
  `static final String`
  `STUB_OPTION_1_1`
  option for stub 1.1 in the rmic task: "1.1"
  `static final String`
  `STUB_OPTION_1_2`
  option for stub 1.2 in the rmic task: "1.2"
  `static final String`
  `STUB_OPTION_COMPAT`
  option for stub compat in the rmic task: "compat"

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `XNewRmic()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected Commandline`
  `setupRmicCommand()`
  Create a normal command line, then with -Xnew at the front

  ### Methods inherited from class ForkingSunRmic

  `areIiopAndIdlSupported, execute, getExecutableName`
  Modifier and Type
  Method
  Description
  `protected boolean`
  `areIiopAndIdlSupported()`
  Whether the iiop and idl switches are supported.
  `boolean`
  `execute()`
  exec by creating a new command
  `protected String`
  `getExecutableName()`
  Override point.

  ### Methods inherited from class DefaultRmicAdapter

  `addStubVersionOptions, filterJvmCompilerArgs, getClasspath, getCompileClasspath, getMapper, getRmic, getSkelClassSuffix, getStubClassSuffix, getTieClassSuffix, logAndAddFilesToCompile, preprocessCompilerArgs, setRmic, setupRmicCommand`
  Modifier and Type
  Method
  Description
  `protected String`
  `addStubVersionOptions()`
  This is an override point; get the stub version off the rmic command and translate that into a compiler-specific argument
  `protected String[]`
  `filterJvmCompilerArgs(String[] compilerArgs)`
  Strip out all -J args from the command list.
  `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"
  `protected String[]`
  `preprocessCompilerArgs(String[] compilerArgs)`
  Preprocess the compiler arguments in any way you see fit.
  `void`
  `setRmic(Rmic attributes)`
  Sets Rmic attributes
  `protected Commandline`
  `setupRmicCommand(String[] options)`
  Setup rmic argument for rmic.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### COMPILER_NAME

    public static final String COMPILER_NAME
    the name of this adapter for users to select
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### XNewRmic

    public XNewRmic()

- ## Method Details

  - ### setupRmicCommand

    protected Commandline setupRmicCommand()
    Create a normal command line, then with -Xnew at the front
    Overrides:
      `setupRmicCommand` in class `DefaultRmicAdapter`
    Returns:
      a command line that hands off to thw