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

# Class RmicAdapterFactory

java.lang.Object
org.apache.tools.ant.taskdefs.rmic.RmicAdapterFactory

public final class RmicAdapterFactory extends Object
Creates the necessary rmic adapter, given basic criteria.

Since:
  1.4

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `DEFAULT_COMPILER`
  If the compiler has this name use a default compiler.
  `static final String`
  `ERROR_NOT_RMIC_ADAPTER`
  The error message to be used when the class is not an rmic adapter.
  `static final String`
  `ERROR_UNKNOWN_COMPILER`
  The error message to be used when the compiler cannot be found.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static RmicAdapter`
  `getRmic(String rmicType, Task task)`
  Based on the parameter passed in, this method creates the necessary factory desired.
  `static RmicAdapter`
  `getRmic(String rmicType, Task task, Path classpath)`
  Based on the parameter passed in, this method creates the necessary factory desired.

  ### Methods inherited from class Object

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

- ## Field Details

  - ### ERROR_UNKNOWN_COMPILER

    public static final String ERROR_UNKNOWN_COMPILER
    The error message to be used when the compiler cannot be found.
    See Also:
      - Constant Field Values

  - ### ERROR_NOT_RMIC_ADAPTER

    public static final String ERROR_NOT_RMIC_ADAPTER
    The error message to be used when the class is not an rmic adapter.
    See Also:
      - Constant Field Values

  - ### DEFAULT_COMPILER

    public static final String DEFAULT_COMPILER
    If the compiler has this name use a default compiler.
    See Also:
      - Constant Field Values

- ## Method Details

  - ### getRmic

    public static RmicAdapter getRmic(String rmicType, Task task) throws BuildException
    Based on the parameter passed in, this method creates the necessary factory desired.

    The current mapping for rmic names are as follows:

    - sun = SUN's rmic
    - kaffe = Kaffe's rmic
    - a fully qualified classname = the name of a rmic adapter
    - weblogic = weblogic compiler
    - forking = Sun's RMIC by forking a new JVM
    Parameters:
      `rmicType` - either the name of the desired rmic, or the full classname of the rmic's adapter.
      `task` - a task to log through.
    Returns:
      the compiler adapter
    Throws:
      `BuildException` - if the rmic type could not be resolved into a rmic adapter.

  - ### getRmic

    public static RmicAdapter getRmic(String rmicType, Task task, Path classpath) throws BuildException
    Based on the parameter passed in, this method creates the necessary factory desired.

    The current mapping for rmic names are as follows:

    - sun = SUN's rmic
    - kaffe = Kaffe's rmic
    - a fully qualified classname = the name of a rmic adapter
    - weblogic = WebLogic compiler
    - forking = Sun's RMIC by forking a new JVM
    Parameters:
      `rmicType` - either the name of the desired rmic, or the full classname of the rmic's adapter.
      `task` - a task to log through.
      `classpath` - the classpath to use when looking up an adapter class
    Returns:
      the compiler adapter
    Throws:
      `BuildException` - if the rmic type could not be resolved into a rmic adapter.
    Since:
      Ant 1.8.0