public abstract class AbstractTranslator extends Object implements CompilerTranslator
| Modifier and Type | Class and Description |
|---|---|
static interface |
AbstractTranslator.ClassLoaderFacade
An interface for loading the proper IDL compiler class.
|
| Constructor and Description |
|---|
AbstractTranslator() |
| Modifier and Type | Method and Description |
|---|---|
protected AbstractTranslator.ClassLoaderFacade |
getClassLoaderFacade()
Returns the object to use for classloading.
|
org.apache.maven.plugin.logging.Log |
getLog() |
protected void |
invokeCompilerInProcess(Class<?> compilerClass,
List<String> args)
Invokes the configured compiler and throws an exception if anything goes wrong
|
boolean |
isDebug() |
boolean |
isFailOnError() |
protected static boolean |
isFork()
Returns true if the translator is allowed to create a new forked process.
|
protected abstract int |
runCompiler(Class<?> compilerClass,
String... arguments)
Runs the IDL compiler
|
void |
setDebug(boolean debug)
Enable/disable debug messages.
|
void |
setFailOnError(boolean failOnError)
Set to true to fail the build if an error occur while compiling the IDL.
|
void |
setLog(org.apache.maven.plugin.logging.Log log)
The
Log that will used for the messages |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinvokeCompilerpublic boolean isDebug()
public void setDebug(boolean debug)
CompilerTranslatorsetDebug in interface CompilerTranslatordebug - the debug to setpublic org.apache.maven.plugin.logging.Log getLog()
public void setLog(org.apache.maven.plugin.logging.Log log)
CompilerTranslatorLog that will used for the messagessetLog in interface CompilerTranslatorlog - the log to setpublic boolean isFailOnError()
public void setFailOnError(boolean failOnError)
CompilerTranslatorsetFailOnError in interface CompilerTranslatorfailOnError - the failOnError to setprotected static boolean isFork()
protected AbstractTranslator.ClassLoaderFacade getClassLoaderFacade()
protected void invokeCompilerInProcess(Class<?> compilerClass, List<String> args) throws org.apache.maven.plugin.MojoExecutionException
compilerClass - the class representing the compiler to invokeargs - the arguments to pass to the compilerorg.apache.maven.plugin.MojoExecutionException - if any error occursprotected abstract int runCompiler(Class<?> compilerClass, String... arguments) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException
compilerClass - the class which implements the compilerarguments - the arguments to pass to the compilerNoSuchMethodException - if the method which should run the compiler does not existIllegalAccessException - if no constructor is availableInvocationTargetException - if an error occurs while invoking the compilerCopyright © 2005–2024 MojoHaus. All rights reserved.