|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.components.language.programming.AbstractProgrammingLanguage
org.apache.cocoon.components.language.programming.CompiledProgrammingLanguage
org.apache.cocoon.components.language.programming.java.JavaLanguage
public class JavaLanguage
The Java programming language processor
| Field Summary | |
|---|---|
protected ServiceManager |
manager
The service 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 | |
|---|---|
JavaLanguage()
|
|
| Method Summary | |
|---|---|
protected void |
compile(String name,
File baseDirectory,
String encoding)
Compile a source file yielding a loadable class file. |
void |
dispose()
dispose |
void |
doUnload(Object program)
Unload a previously loaded class. |
String |
getObjectExtension()
Return the language's canonical object file extension. |
String |
getSourceExtension()
Return the language's canonical source file extension. |
void |
initialize()
|
protected Class |
loadProgram(String name,
File baseDirectory)
Actually load an object program from a class file. |
void |
parameterize(Parameters params)
Set the configuration parameters. |
String |
quoteString(String constant)
Escape a String according to the Java string constant
encoding rules. |
void |
service(ServiceManager manager)
Set the global service manager. |
| 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 |
| Field Detail |
|---|
protected ServiceManager manager
| Constructor Detail |
|---|
public JavaLanguage()
| Method Detail |
|---|
public String getSourceExtension()
getSourceExtension in interface ProgrammingLanguagepublic String getObjectExtension()
getObjectExtension in class CompiledProgrammingLanguage
public void parameterize(Parameters params)
throws ParameterException
ClassLoaderManager
parameterize in interface Parameterizableparameterize in class CompiledProgrammingLanguageparams - The configuration parameters
ParameterException - If the class loader manager cannot be
instantiated or looked up.
public void service(ServiceManager manager)
throws ServiceException
service in interface Serviceablemanager - The global service manager
ServiceException
public void initialize()
throws Exception
initialize in interface InitializableException
protected Class loadProgram(String name,
File baseDirectory)
throws LanguageException
loadProgram in class CompiledProgrammingLanguagename - The object program base file namebaseDirectory - The directory containing the object program file
LanguageException - If an error occurs during loading
protected void compile(String name,
File baseDirectory,
String encoding)
throws LanguageException
compile in class CompiledProgrammingLanguagename - The object program base file namebaseDirectory - The directory containing the object program fileencoding - The encoding expected in the source file or
null if it is the platform's default encoding
LanguageException - If an error occurs during compilation
public void doUnload(Object program)
throws LanguageException
doUnload in class CompiledProgrammingLanguageprogram - A previously loaded class
LanguageException - If an error occurs during unloadingpublic String quoteString(String constant)
String according to the Java string constant
encoding rules.
quoteString in interface ProgrammingLanguageconstant - The string to be escaped
public void dispose()
dispose in interface Disposable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||