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 interfaceSunRmiCompiler.ClassLoaderFacadeAn interface for dependencies on classloading - enables unit testing.(package private) static classSunRmiCompiler.ClassLoaderFacadeImplThe production implementation of the classloader dependencies.
-
Field Summary
Fields Modifier and Type Field Description private static SunRmiCompiler.ClassLoaderFacadeclassLoaderFacadeprivate org.apache.maven.plugin.logging.Logloggerstatic java.lang.StringRMIC_CLASSNAMEThe 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.StringbuildClasspath(java.util.List classpathList)voidexecute(AbstractRmiMojo mojo, RmicConfig rmiConfig, java.util.List classesToCompile)Execute the compilerprivate voidexecuteMain(java.lang.Class rmicMainClass, java.lang.String[] args)org.apache.maven.plugin.logging.LoggetLog()Returns the defined log.private java.lang.ClassloadRmicClass()private voidlogClasspath(org.apache.maven.plugin.logging.Log logger, java.net.URL[] urls)(package private) static voidsetClassLoaderFacade(SunRmiCompiler.ClassLoaderFacade classLoaderFacade)Specifies the implementation of the classloader facade to usevoidsetLog(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:
executein 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:RmiCompilerDefines the logger to use.- Specified by:
setLogin interfaceRmiCompiler
-
getLog
public org.apache.maven.plugin.logging.Log getLog()
Description copied from interface:RmiCompilerReturns the defined log.- Specified by:
getLogin 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
-
-