Package org.codehaus.mojo.rmic
Class SunRmiCompiler
- java.lang.Object
-
- org.codehaus.mojo.rmic.SunRmiCompiler
-
- All Implemented Interfaces:
RmiCompiler
public class SunRmiCompiler extends java.lang.Object implements RmiCompiler
- Version:
- $Id: SunRmiCompiler.java 17141 2012-07-16 17:33:24Z russgold $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static interface
SunRmiCompiler.ClassLoaderFacade
An interface for dependencies on classloading - enables unit testing.(package private) static class
SunRmiCompiler.ClassLoaderFacadeImpl
The production implementation of the classloader dependencies.
-
Field Summary
Fields Modifier and Type Field Description private static SunRmiCompiler.ClassLoaderFacade
classLoaderFacade
private org.apache.maven.plugin.logging.Log
logger
static java.lang.String
RMIC_CLASSNAME
The name of the class to use for rmi compilation.
-
Constructor Summary
Constructors Constructor Description SunRmiCompiler()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.String
buildClasspath(java.util.List classpathList)
void
execute(AbstractRmiMojo mojo, RmicConfig rmiConfig, java.util.List classesToCompile)
Execute the compilerprivate void
executeMain(java.lang.Class rmicMainClass, java.lang.String[] args)
org.apache.maven.plugin.logging.Log
getLog()
Returns the defined log.private java.lang.Class
loadRmicClass()
private void
logClasspath(org.apache.maven.plugin.logging.Log logger, java.net.URL[] urls)
(package private) static void
setClassLoaderFacade(SunRmiCompiler.ClassLoaderFacade classLoaderFacade)
Specifies the implementation of the classloader facade to usevoid
setLog(org.apache.maven.plugin.logging.Log log)
Defines the logger to use.
-
-
-
Field Detail
-
RMIC_CLASSNAME
public static final java.lang.String RMIC_CLASSNAME
The name of the class to use for rmi compilation.- See Also:
- Constant Field Values
-
classLoaderFacade
private static SunRmiCompiler.ClassLoaderFacade classLoaderFacade
-
logger
private org.apache.maven.plugin.logging.Log logger
-
-
Method Detail
-
setClassLoaderFacade
static void setClassLoaderFacade(SunRmiCompiler.ClassLoaderFacade classLoaderFacade)
Specifies the implementation of the classloader facade to use- Parameters:
classLoaderFacade
- a wrapper for class loading.
-
execute
public void execute(AbstractRmiMojo mojo, RmicConfig rmiConfig, java.util.List classesToCompile) throws RmiCompilerException
Execute the compiler- Specified by:
execute
in interfaceRmiCompiler
- Parameters:
mojo
-rmiConfig
- The config objectclassesToCompile
- The list of classes to rmi compile- Throws:
RmiCompilerException
- if there is a problem during compile
-
buildClasspath
private java.lang.String buildClasspath(java.util.List classpathList)
-
setLog
public void setLog(org.apache.maven.plugin.logging.Log log)
Description copied from interface:RmiCompiler
Defines the logger to use.- Specified by:
setLog
in interfaceRmiCompiler
-
getLog
public org.apache.maven.plugin.logging.Log getLog()
Description copied from interface:RmiCompiler
Returns the defined log.- Specified by:
getLog
in interfaceRmiCompiler
-
loadRmicClass
private java.lang.Class loadRmicClass() throws RmiCompilerException
- Throws:
RmiCompilerException
-
logClasspath
private void logClasspath(org.apache.maven.plugin.logging.Log logger, java.net.URL[] urls)
-
executeMain
private void executeMain(java.lang.Class rmicMainClass, java.lang.String[] args) throws RmiCompilerException
- Parameters:
rmicMainClass
- The class to use to run the rmicargs
- Arguments to be passed to rmic- Throws:
RmiCompilerException
- If there is a problem during the compile
-
-