|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnu.staldal.lsp.compiler.LSPCompilerHelper
public class LSPCompilerHelper
Wrapper around LSPCompiler to handle reading input files and writing the result to a file.
Instances of this class may be reused, but may not be used from several threads concurrently. Create several instances if multiple threads needs to compile concurrently.
LSPCompiler| Constructor Summary | |
|---|---|
LSPCompilerHelper()
Create a new LSP compiler. |
|
| Method Summary | |
|---|---|
boolean |
doCompile(java.lang.String mainPage,
boolean force)
Compiles an LSP file. |
static java.lang.String |
getPageName(java.lang.String sourceFilename)
Get pageName. |
void |
setAcceptNull(boolean acceptNull)
Deprecated. use setAcceptUnbound(boolean) instead |
void |
setAcceptUnbound(boolean acceptUnbound)
Set to true to make the compiled page accept
unbound values without runtime error. |
void |
setEncloseFile(java.io.File encloseFile)
Enclose to use. |
void |
setHtml(boolean html)
Set to true to use html as default output
type. |
void |
setSourcePath(java.io.File[] sourcePath)
Where to look for imported files with relative URL:s (will search the directory where the source file is as well). |
void |
setStartDir(java.io.File startDir)
Where to look for files to compile, default is current directory. |
void |
setTargetDir(java.io.File targetDir)
Where to place generated files, default is current directory. |
void |
setXhtml(boolean xhtml)
Deprecated. XHTML is now default, use setHtml(boolean) to override it. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LSPCompilerHelper()
| Method Detail |
|---|
public boolean doCompile(java.lang.String mainPage,
boolean force)
throws LSPException
mainPage - the main LSP file to compileforce - force compilation, override dependency checking.
true if page was compiled, falseotherwise
LSPException - with an error message if unsuccessfulpublic static java.lang.String getPageName(java.lang.String sourceFilename)
sourceFilename - the source filename
public void setStartDir(java.io.File startDir)
startDir - the start directorypublic void setSourcePath(java.io.File[] sourcePath)
sourcePath - the source pathpublic void setTargetDir(java.io.File targetDir)
targetDir - the target directorypublic void setEncloseFile(java.io.File encloseFile)
null to not use any enclose.
encloseFile - the enclose file@Deprecated public void setXhtml(boolean xhtml)
setHtml(boolean) to override it.
true to use xhtml as default output
type.
xhtml - public void setHtml(boolean html)
true to use html as default output
type.
html - @Deprecated public void setAcceptNull(boolean acceptNull)
setAcceptUnbound(boolean) instead
acceptNull - public void setAcceptUnbound(boolean acceptUnbound)
true to make the compiled page accept
unbound values without runtime error.
acceptUnbound -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||