Package org.codehaus.mojo.idlj
Class JacorbTranslator
java.lang.Object
org.codehaus.mojo.idlj.AbstractTranslator
org.codehaus.mojo.idlj.JacorbTranslator
- All Implemented Interfaces:
CompilerTranslator
This class implement the
CompilerTranslator
for 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 -
Method Summary
Modifier and TypeMethodDescriptionprivate void
invokeCompiler
(Class<?> compilerClass, List<String> args) Invoke the specified compiler with a set of argumentsvoid
invokeCompiler
(String sourceDirectory, File[] includeDirs, String targetDirectory, String idlFile, Source source) This method it's used to invoke the compilerprivate static void
redirectStream
(InputStream in, OutputStream out) This methos it's used to redirect anInputeStream
to aOutputStream
protected int
runCompiler
(Class<?> compilerClass, String... arguments) Runs the IDL compilerMethods 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
-
Constructor Details
-
JacorbTranslator
JacorbTranslator()Default constructor
-
-
Method Details
-
invokeCompiler
private void invokeCompiler(Class<?> compilerClass, List<String> args) throws org.apache.maven.plugin.MojoExecutionException Invoke the specified compiler with a set of arguments- Parameters:
compilerClass
- theClass
that implements the compilerargs
- aList
that 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(Class<?> compilerClass, String... arguments) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException Description copied from class:AbstractTranslator
Runs the IDL compiler- Specified by:
runCompiler
in 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:
NoSuchMethodException
- if the method which should run the compiler does not existIllegalAccessException
- if no constructor is availableInvocationTargetException
- if an error occurs while invoking the compiler
-
invokeCompiler
public void invokeCompiler(String sourceDirectory, File[] includeDirs, String targetDirectory, String idlFile, Source source) throws org.apache.maven.plugin.MojoExecutionException This method it's used to invoke the compiler- Specified by:
invokeCompiler
in 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
This methos it's used to redirect anInputeStream
to aOutputStream
- Parameters:
in
- theInputStream
to read fromout
- theOutputStream
to write into
-