|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.avalon.framework.logger.AbstractLoggable | +--org.apache.cocoon.components.language.programming.AbstractProgrammingLanguage | +--org.apache.cocoon.components.language.programming.CompiledProgrammingLanguage | +--org.apache.cocoon.components.language.programming.java.JavaLanguage
The Java programming language processor
Field Summary | |
protected org.apache.avalon.framework.component.ComponentManager |
manager
The component manager |
Fields inherited from class org.apache.cocoon.components.language.programming.CompiledProgrammingLanguage |
classpath, 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(java.lang.String name,
java.io.File baseDirectory,
java.lang.String encoding)
Compile a source file yielding a loadable class file. |
void |
compose(org.apache.avalon.framework.component.ComponentManager manager)
Set the global component manager. |
void |
dispose()
dispose |
void |
doUnload(java.lang.Object program)
Unload a previously loaded class. |
java.lang.String |
getObjectExtension()
Return the language's canonical object file extension. |
java.lang.String |
getSourceExtension()
Return the language's canonical source file extension. |
void |
initialize()
|
protected java.lang.Class |
loadProgram(java.lang.String name,
java.io.File baseDirectory)
Actually load an object program from a class file. |
void |
parameterize(org.apache.avalon.framework.parameters.Parameters params)
Set the configuration parameters. |
java.lang.String |
quoteString(java.lang.String constant)
Escape a String according to the Java string constant
encoding rules. |
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.AbstractLoggable |
getLogger, setLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected org.apache.avalon.framework.component.ComponentManager manager
Constructor Detail |
public JavaLanguage()
Method Detail |
public java.lang.String getSourceExtension()
getSourceExtension
in interface ProgrammingLanguage
public java.lang.String getObjectExtension()
getObjectExtension
in class CompiledProgrammingLanguage
public void parameterize(org.apache.avalon.framework.parameters.Parameters params) throws org.apache.avalon.framework.parameters.ParameterException
ClassLoaderManager
parameterize
in interface org.apache.avalon.framework.parameters.Parameterizable
parameterize
in class CompiledProgrammingLanguage
params
- The configuration parameters
org.apache.avalon.framework.parameters.ParameterException
- If the class loader manager cannot be instantiatedpublic void compose(org.apache.avalon.framework.component.ComponentManager manager)
compose
in interface org.apache.avalon.framework.component.Composable
manager
- The global component managerpublic void initialize() throws java.lang.Exception
initialize
in interface org.apache.avalon.framework.activity.Initializable
java.lang.Exception
protected java.lang.Class loadProgram(java.lang.String name, java.io.File baseDirectory) throws LanguageException
loadProgram
in class CompiledProgrammingLanguage
name
- The object program base file namebaseDirectory
- The directory containing the object program file
LanguageException
- If an error occurs during loadingprotected void compile(java.lang.String name, java.io.File baseDirectory, java.lang.String encoding) throws LanguageException
compile
in class CompiledProgrammingLanguage
name
- 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 compilationpublic void doUnload(java.lang.Object program) throws LanguageException
doUnload
in class CompiledProgrammingLanguage
program
- A previously loaded class
LanguageException
- If an error occurs during unloadingpublic java.lang.String quoteString(java.lang.String constant)
String
according to the Java string constant
encoding rules.
quoteString
in interface ProgrammingLanguage
constant
- The string to be escaped
public void dispose()
dispose
in interface org.apache.avalon.framework.activity.Disposable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |