org.apache.cocoon.components.language.programming.javascript
Class CompiledJavascriptLanguage

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.components.language.programming.AbstractProgrammingLanguage
          extended by org.apache.cocoon.components.language.programming.CompiledProgrammingLanguage
              extended by org.apache.cocoon.components.language.programming.java.JavaLanguage
                  extended by org.apache.cocoon.components.language.programming.javascript.CompiledJavascriptLanguage
All Implemented Interfaces:
Disposable, Initializable, Component, Contextualizable, LogEnabled, Parameterizable, Serviceable, ThreadSafe, ProgrammingLanguage

public class CompiledJavascriptLanguage
extends JavaLanguage

The compiled Javascript (Rhino) programming language processor

Version:
CVS $Id: CompiledJavascriptLanguage.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Ricardo Rocha

Field Summary
 
Fields inherited from class org.apache.cocoon.components.language.programming.java.JavaLanguage
manager
 
Fields inherited from class org.apache.cocoon.components.language.programming.CompiledProgrammingLanguage
compilerClass, deleteSources
 
Fields inherited from class org.apache.cocoon.components.language.programming.AbstractProgrammingLanguage
codeFormatter, languageName
 
Fields inherited from interface org.apache.cocoon.components.language.programming.ProgrammingLanguage
ROLE
 
Constructor Summary
CompiledJavascriptLanguage()
           
 
Method Summary
protected  void compile(String name, File baseDirectory, String encoding)
          Compile a source file yielding a loadable class file.
 String getSourceExtension()
          Return the language's canonical source file extension.
 
Methods inherited from class org.apache.cocoon.components.language.programming.java.JavaLanguage
dispose, doUnload, getObjectExtension, initialize, loadProgram, parameterize, quoteString, service
 
Methods inherited from class org.apache.cocoon.components.language.programming.CompiledProgrammingLanguage
contextualize, doUnload, load, preload
 
Methods inherited from class org.apache.cocoon.components.language.programming.AbstractProgrammingLanguage
getCodeFormatter, getLanguageName, instantiate, setLanguageName, unload
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompiledJavascriptLanguage

public CompiledJavascriptLanguage()
Method Detail

getSourceExtension

public String getSourceExtension()
Return the language's canonical source file extension.

Specified by:
getSourceExtension in interface ProgrammingLanguage
Overrides:
getSourceExtension in class JavaLanguage
Returns:
The source file extension

compile

protected void compile(String name,
                       File baseDirectory,
                       String encoding)
                throws LanguageException
Compile a source file yielding a loadable class file.

Overrides:
compile in class JavaLanguage
Parameters:
name - The object program base file name
baseDirectory - The directory containing the object program file
encoding - The encoding expected in the source file or null if it is the platform's default encoding
Throws:
LanguageException - If an error occurs during compilation


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.