Package org.codehaus.mojo.idlj
Class JacorbTranslator
- java.lang.Object
-
- org.codehaus.mojo.idlj.AbstractTranslator
-
- org.codehaus.mojo.idlj.JacorbTranslator
-
- All Implemented Interfaces:
CompilerTranslator
class JacorbTranslator extends AbstractTranslator implements CompilerTranslator
This class implement theCompilerTranslatorfor the JacORB IDL compiler- Version:
- $Id$
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.codehaus.mojo.idlj.AbstractTranslator
AbstractTranslator.ClassLoaderFacade
-
-
Constructor Summary
Constructors Constructor Description JacorbTranslator()Default constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidinvokeCompiler(java.lang.Class<?> compilerClass, java.util.List<java.lang.String> args)Invoke the specified compiler with a set of argumentsvoidinvokeCompiler(java.lang.String sourceDirectory, java.io.File[] includeDirs, java.lang.String targetDirectory, java.lang.String idlFile, Source source)This method it's used to invoke the compilerprivate static voidredirectStream(java.io.InputStream in, java.io.OutputStream out)This methos it's used to redirect anInputeStreamto aOutputStreamprotected intrunCompiler(java.lang.Class<?> compilerClass, java.lang.String... arguments)Runs the IDL compiler-
Methods inherited from class org.codehaus.mojo.idlj.AbstractTranslator
getClassLoaderFacade, getLog, invokeCompilerInProcess, isDebug, isFailOnError, isFork, setClassLoaderFacade, setDebug, setFailOnError, setLog
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.codehaus.mojo.idlj.CompilerTranslator
setDebug, setFailOnError, setLog
-
-
-
-
Method Detail
-
invokeCompiler
private void invokeCompiler(java.lang.Class<?> compilerClass, java.util.List<java.lang.String> args) throws org.apache.maven.plugin.MojoExecutionExceptionInvoke the specified compiler with a set of arguments- Parameters:
compilerClass- theClassthat implements the compilerargs- aListthat contains the arguments to use for the compiler- Throws:
org.apache.maven.plugin.MojoExecutionException- if the compilation fail or the compiler crashes
-
runCompiler
protected int runCompiler(java.lang.Class<?> compilerClass, java.lang.String... arguments) throws java.lang.NoSuchMethodException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetExceptionDescription copied from class:AbstractTranslatorRuns the IDL compiler- Specified by:
runCompilerin classAbstractTranslator- Parameters:
compilerClass- the class which implements the compilerarguments- the arguments to pass to the compiler- Returns:
- the return status (a non-zero value indicates an error)
- Throws:
java.lang.NoSuchMethodException- if the method which should run the compiler does not existjava.lang.IllegalAccessException- if no constructor is availablejava.lang.reflect.InvocationTargetException- if an error occurs while invoking the compiler
-
invokeCompiler
public void invokeCompiler(java.lang.String sourceDirectory, java.io.File[] includeDirs, java.lang.String targetDirectory, java.lang.String idlFile, Source source) throws org.apache.maven.plugin.MojoExecutionExceptionThis method it's used to invoke the compiler- Specified by:
invokeCompilerin interfaceCompilerTranslator- Parameters:
sourceDirectory- the path to the sourcesincludeDirs- theFile[]of directories where to find the includestargetDirectory- the path to the destination of the compilationidlFile- the path to the file to compilesource- the source set on which to run the compiler- Throws:
org.apache.maven.plugin.MojoExecutionException- the exeception is thrown whenever the compilation fails or crashes
-
redirectStream
private static void redirectStream(java.io.InputStream in, java.io.OutputStream out)This methos it's used to redirect anInputeStreamto aOutputStream- Parameters:
in- theInputStreamto read fromout- theOutputStreamto write into
-
-