Top Description Fields Constructors Methods
org.apache.tools.ant.taskdefs.rmic

public final Class RmicAdapterFactory

extends Object
Class Inheritance
Imports
org.apache.tools.ant.BuildException, .Task, org.apache.tools.ant.types.Path, org.apache.tools.ant.util.ClasspathUtils, .JavaEnvUtils

Creates the necessary rmic adapter, given basic criteria.
Since
1.4

Field Summary

Modifier and TypeField and Description
public static final String
DEFAULT_COMPILER

If the compiler has this name use a default compiler.

public static final String
ERROR_NOT_RMIC_ADAPTER

The error message to be used when the class is not an rmic adapter.

public static final String
ERROR_UNKNOWN_COMPILER

The error message to be used when the compiler cannot be found.

Constructor Summary

AccessConstructor and Description
private
RmicAdapterFactory()

This is a singleton -- can't create instances!!

Method Summary

Modifier and TypeMethod and Description
public static RmicAdapter

Returns:

the compiler adapter
getRmic
(String
either the name of the desired rmic, or the full classname of the rmic's adapter.
rmicType
,
Task
a task to log through.
task
)

Based on the parameter passed in, this method creates the necessary factory desired.

public static RmicAdapter

Returns:

the compiler adapter
getRmic
(String
either the name of the desired rmic, or the full classname of the rmic's adapter.
rmicType
,
Task
a task to log through.
task
,
Path
the classpath to use when looking up an adapter class
classpath
)

Based on the parameter passed in, this method creates the necessary factory desired.

private static RmicAdapter
resolveClassName(String
The fully qualified classname to be created.
className
,
ClassLoader
the classloader to use
loader
)

Tries to resolve the given classname into a rmic adapter.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEFAULT_COMPILERback to summary
public static final String DEFAULT_COMPILER

If the compiler has this name use a default compiler.

ERROR_NOT_RMIC_ADAPTERback to summary
public static final String ERROR_NOT_RMIC_ADAPTER

The error message to be used when the class is not an rmic adapter.

ERROR_UNKNOWN_COMPILERback to summary
public static final String ERROR_UNKNOWN_COMPILER

The error message to be used when the compiler cannot be found.

Constructor Detail

RmicAdapterFactoryback to summary
private RmicAdapterFactory()

This is a singleton -- can't create instances!!

Method Detail

getRmicback to summary
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:String

either the name of the desired rmic, or the full classname of the rmic's adapter.

task:Task

a task to log through.

Returns:RmicAdapter

the compiler adapter

Exceptions
BuildException:
if the rmic type could not be resolved into a rmic adapter.
getRmicback to summary
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:String

either the name of the desired rmic, or the full classname of the rmic's adapter.

task:Task

a task to log through.

classpath:Path

the classpath to use when looking up an adapter class

Returns:RmicAdapter

the compiler adapter

Exceptions
BuildException:
if the rmic type could not be resolved into a rmic adapter.
Since
Ant 1.8.0
resolveClassNameback to summary
private static RmicAdapter resolveClassName(String className, ClassLoader loader) throws BuildException

Tries to resolve the given classname into a rmic adapter. Throws a fit if it can't.

Parameters
className:String

The fully qualified classname to be created.

loader:ClassLoader

the classloader to use

Exceptions
BuildException:
This is the fit that is thrown if className isn't an instance of RmicAdapter.